Mercurial > pidgin-twitter
comparison pidgin-twitter.c @ 147:3abee459c81c
removed old prefs stuff.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 24 Jul 2008 06:40:41 +0900 |
parents | 62b90f3b0b8a |
children | 4e9d0fd93fb6 |
comparison
equal
deleted
inserted
replaced
146:62b90f3b0b8a | 147:3abee459c81c |
---|---|
2700 | 2700 |
2701 gtk_widget_show_all(notebook); | 2701 gtk_widget_show_all(notebook); |
2702 return notebook; | 2702 return notebook; |
2703 } | 2703 } |
2704 | 2704 |
2705 #if 0 | |
2706 static PurplePluginPrefFrame * | |
2707 get_plugin_pref_frame(PurplePlugin *plugin) | |
2708 { | |
2709 /* create gtk elements for the plugin preferences */ | |
2710 PurplePluginPref *pref; | |
2711 PurplePluginPrefFrame *frame = purple_plugin_pref_frame_new(); | |
2712 | |
2713 /************************/ | |
2714 /* screen name heading */ | |
2715 /************************/ | |
2716 pref = purple_plugin_pref_new_with_label("Screen Name"); | |
2717 purple_plugin_pref_frame_add(frame, pref); | |
2718 | |
2719 /* twitter */ | |
2720 pref = | |
2721 purple_plugin_pref_new_with_name_and_label(OPT_SCREEN_NAME_TWITTER, | |
2722 "twitter"); | |
2723 purple_plugin_pref_frame_add(frame, pref); | |
2724 | |
2725 /* wassr */ | |
2726 pref = | |
2727 purple_plugin_pref_new_with_name_and_label(OPT_SCREEN_NAME_WASSR, | |
2728 "wassr"); | |
2729 purple_plugin_pref_frame_add(frame, pref); | |
2730 | |
2731 /* identica */ | |
2732 pref = | |
2733 purple_plugin_pref_new_with_name_and_label(OPT_SCREEN_NAME_IDENTICA, | |
2734 "identi.ca"); | |
2735 purple_plugin_pref_frame_add(frame, pref); | |
2736 | |
2737 | |
2738 /************************/ | |
2739 /* translation heading */ | |
2740 /************************/ | |
2741 pref = purple_plugin_pref_new_with_label("Translation"); | |
2742 purple_plugin_pref_frame_add(frame, pref); | |
2743 | |
2744 /* translation settings */ | |
2745 pref = purple_plugin_pref_new_with_name_and_label(OPT_TRANSLATE_RECIPIENT, | |
2746 "Translate @username to link"); | |
2747 purple_plugin_pref_frame_add(frame, pref); | |
2748 | |
2749 pref = purple_plugin_pref_new_with_name_and_label(OPT_TRANSLATE_SENDER, | |
2750 "Translate sender name to link"); | |
2751 purple_plugin_pref_frame_add(frame, pref); | |
2752 | |
2753 pref = purple_plugin_pref_new_with_name_and_label(OPT_TRANSLATE_CHANNEL, | |
2754 "Translate channel name to link (wassr only)"); | |
2755 purple_plugin_pref_frame_add(frame, pref); | |
2756 | |
2757 | |
2758 /*******************/ | |
2759 /* Utility heading */ | |
2760 /*******************/ | |
2761 pref = purple_plugin_pref_new_with_label("Utility"); | |
2762 purple_plugin_pref_frame_add(frame, pref); | |
2763 | |
2764 /* show icon */ | |
2765 pref = purple_plugin_pref_new_with_name_and_label(OPT_SHOW_ICON, | |
2766 "Show icons in conversation"); | |
2767 purple_plugin_pref_frame_add(frame, pref); | |
2768 | |
2769 /* icon size */ | |
2770 pref = purple_plugin_pref_new_with_name_and_label(OPT_ICON_SIZE, | |
2771 "Icon size in pixel"); | |
2772 purple_plugin_pref_set_bounds(pref, 16, 128); | |
2773 purple_plugin_pref_frame_add(frame, pref); | |
2774 purple_prefs_connect_callback(plugin, OPT_ICON_SIZE, | |
2775 icon_size_prefs_cb, NULL); | |
2776 | |
2777 /* show text counter */ | |
2778 pref = purple_plugin_pref_new_with_name_and_label(OPT_COUNTER, | |
2779 "Show text counter widget"); | |
2780 purple_plugin_pref_frame_add(frame, pref); | |
2781 purple_prefs_connect_callback(plugin, OPT_COUNTER, | |
2782 counter_prefs_cb, NULL); | |
2783 | |
2784 /* escape pseudo command setting */ | |
2785 pref = purple_plugin_pref_new_with_name_and_label(OPT_ESCAPE_PSEUDO, | |
2786 "Escape pseudo command string"); | |
2787 purple_plugin_pref_frame_add(frame, pref); | |
2788 | |
2789 /* suppress oops message */ | |
2790 pref = purple_plugin_pref_new_with_name_and_label(OPT_SUPPRESS_OOPS, | |
2791 "Suppress oops message"); | |
2792 purple_plugin_pref_frame_add(frame, pref); | |
2793 | |
2794 | |
2795 /* notification setting */ | |
2796 pref = | |
2797 purple_plugin_pref_new_with_name_and_label(OPT_PREVENT_NOTIFICATION, | |
2798 "Do not notify incoming message"); | |
2799 purple_plugin_pref_frame_add(frame, pref); | |
2800 | |
2801 /******************/ | |
2802 /* sound heading */ | |
2803 /******************/ | |
2804 pref = purple_plugin_pref_new_with_label("Sound"); | |
2805 purple_plugin_pref_frame_add(frame, pref); | |
2806 | |
2807 /* sound settings for recipient */ | |
2808 pref = purple_plugin_pref_new_with_name_and_label(OPT_PLAYSOUND_RECIPIENT, | |
2809 "Play sound on a reply to the user in the recipient list"); | |
2810 purple_plugin_pref_frame_add(frame, pref); | |
2811 | |
2812 /* recipient list */ | |
2813 pref = purple_plugin_pref_new_with_name_and_label(OPT_USERLIST_RECIPIENT, | |
2814 "Recipient List"); | |
2815 purple_plugin_pref_frame_add(frame, pref); | |
2816 | |
2817 /* sound id selector */ | |
2818 pref = | |
2819 purple_plugin_pref_new_with_name_and_label(OPT_SOUNDID_RECIPIENT, | |
2820 "Recipient Sound"); | |
2821 | |
2822 purple_plugin_pref_set_type(pref, PURPLE_PLUGIN_PREF_CHOICE); | |
2823 purple_plugin_pref_add_choice(pref, "Arrive", GINT_TO_POINTER(0)); | |
2824 purple_plugin_pref_add_choice(pref, "Leave", GINT_TO_POINTER(1)); | |
2825 purple_plugin_pref_add_choice(pref, "Receive", GINT_TO_POINTER(2)); | |
2826 purple_plugin_pref_add_choice(pref, "First Receive", GINT_TO_POINTER(3)); | |
2827 purple_plugin_pref_add_choice(pref, "Send", GINT_TO_POINTER(4)); | |
2828 purple_plugin_pref_add_choice(pref, "Chat Join", GINT_TO_POINTER(5)); | |
2829 purple_plugin_pref_add_choice(pref, "Chat Leave", GINT_TO_POINTER(6)); | |
2830 purple_plugin_pref_add_choice(pref, "Chat You Say", GINT_TO_POINTER(7)); | |
2831 purple_plugin_pref_add_choice(pref, "Chat Someone Say", GINT_TO_POINTER(8)); | |
2832 purple_plugin_pref_add_choice(pref, "Pounce Default", GINT_TO_POINTER(9)); | |
2833 purple_plugin_pref_add_choice(pref, "Chat Nick Said", GINT_TO_POINTER(10)); | |
2834 | |
2835 purple_plugin_pref_frame_add(frame, pref); | |
2836 | |
2837 /* sound setting for sender */ | |
2838 pref = purple_plugin_pref_new_with_name_and_label(OPT_PLAYSOUND_SENDER, | |
2839 "Play sound if sender of a message is in the sender list"); | |
2840 purple_plugin_pref_frame_add(frame, pref); | |
2841 | |
2842 /* sender list */ | |
2843 pref = purple_plugin_pref_new_with_name_and_label(OPT_USERLIST_SENDER, | |
2844 "Sender List"); | |
2845 purple_plugin_pref_frame_add(frame, pref); | |
2846 | |
2847 /* sound id selector */ | |
2848 pref = | |
2849 purple_plugin_pref_new_with_name_and_label(OPT_SOUNDID_SENDER, | |
2850 "Sender Sound"); | |
2851 | |
2852 purple_plugin_pref_set_type(pref, PURPLE_PLUGIN_PREF_CHOICE); | |
2853 purple_plugin_pref_add_choice(pref, "Arrive", GINT_TO_POINTER(0)); | |
2854 purple_plugin_pref_add_choice(pref, "Leave", GINT_TO_POINTER(1)); | |
2855 purple_plugin_pref_add_choice(pref, "Receive", GINT_TO_POINTER(2)); | |
2856 purple_plugin_pref_add_choice(pref, "First Receive", GINT_TO_POINTER(3)); | |
2857 purple_plugin_pref_add_choice(pref, "Send", GINT_TO_POINTER(4)); | |
2858 purple_plugin_pref_add_choice(pref, "Chat Join", GINT_TO_POINTER(5)); | |
2859 purple_plugin_pref_add_choice(pref, "Chat Leave", GINT_TO_POINTER(6)); | |
2860 purple_plugin_pref_add_choice(pref, "Chat You Say", GINT_TO_POINTER(7)); | |
2861 purple_plugin_pref_add_choice(pref, "Chat Someone Say", GINT_TO_POINTER(8)); | |
2862 purple_plugin_pref_add_choice(pref, "Pounce Default", GINT_TO_POINTER(9)); | |
2863 purple_plugin_pref_add_choice(pref, "Chat Nick Said", GINT_TO_POINTER(10)); | |
2864 purple_plugin_pref_frame_add(frame, pref); | |
2865 | |
2866 /****************/ | |
2867 /* API heading */ | |
2868 /****************/ | |
2869 pref = purple_plugin_pref_new_with_label("API Based Twitter Access"); | |
2870 purple_plugin_pref_frame_add(frame, pref); | |
2871 | |
2872 /* post configuration */ | |
2873 pref = purple_plugin_pref_new_with_name_and_label(OPT_API_BASE_POST, | |
2874 "Post/get statuses via API"); | |
2875 purple_plugin_pref_frame_add(frame, pref); | |
2876 | |
2877 purple_prefs_connect_callback(plugin, OPT_API_BASE_POST, | |
2878 api_base_post_cb, NULL); | |
2879 | |
2880 /* password */ | |
2881 pref = purple_plugin_pref_new_with_name_and_label(OPT_PASSWORD_TWITTER, | |
2882 "Password"); | |
2883 purple_plugin_pref_set_masked(pref, TRUE); | |
2884 purple_plugin_pref_frame_add(frame, pref); | |
2885 | |
2886 return frame; | |
2887 } | |
2888 | |
2889 static PurplePluginUiInfo pref_info = { | |
2890 get_plugin_pref_frame | |
2891 }; | |
2892 #endif | |
2893 | |
2894 static PidginPluginUiInfo ui_info = { | 2705 static PidginPluginUiInfo ui_info = { |
2895 prefs_get_frame, | 2706 prefs_get_frame, |
2896 0, /* page number - reserved */ | 2707 0, /* page number - reserved */ |
2897 NULL, /* reserved 1 */ | 2708 NULL, /* reserved 1 */ |
2898 NULL, /* reserved 2 */ | 2709 NULL, /* reserved 2 */ |
2903 static PurplePluginInfo info = { | 2714 static PurplePluginInfo info = { |
2904 PURPLE_PLUGIN_MAGIC, | 2715 PURPLE_PLUGIN_MAGIC, |
2905 PURPLE_MAJOR_VERSION, | 2716 PURPLE_MAJOR_VERSION, |
2906 PURPLE_MINOR_VERSION, | 2717 PURPLE_MINOR_VERSION, |
2907 PURPLE_PLUGIN_STANDARD, /**< type */ | 2718 PURPLE_PLUGIN_STANDARD, /**< type */ |
2908 // NULL, /**< ui_req */ | 2719 PIDGIN_PLUGIN_TYPE, /**< ui_req */ |
2909 PIDGIN_PLUGIN_TYPE, /**< ui_req */ | |
2910 0, /**< flags */ | 2720 0, /**< flags */ |
2911 NULL, /**< deps */ | 2721 NULL, /**< deps */ |
2912 PURPLE_PRIORITY_DEFAULT, /**< priority */ | 2722 PURPLE_PRIORITY_DEFAULT, /**< priority */ |
2913 PLUGIN_ID, /**< id */ | 2723 PLUGIN_ID, /**< id */ |
2914 "Pidgin-Twitter", /**< name */ | 2724 "Pidgin-Twitter", /**< name */ |
2918 "Yoshiki Yazawa, mikanbako, \nKonosuke Watanabe, IWATA Ray, mojin, \nthe pidging-twitter team", /**< author */ | 2728 "Yoshiki Yazawa, mikanbako, \nKonosuke Watanabe, IWATA Ray, mojin, \nthe pidging-twitter team", /**< author */ |
2919 "http://www.honeyplanet.jp/", /**< homepage */ | 2729 "http://www.honeyplanet.jp/", /**< homepage */ |
2920 load_plugin, /**< load */ | 2730 load_plugin, /**< load */ |
2921 unload_plugin, /**< unload */ | 2731 unload_plugin, /**< unload */ |
2922 NULL, /**< destroy */ | 2732 NULL, /**< destroy */ |
2923 #if 0 | |
2924 NULL, /**< ui_info */ | |
2925 NULL, /**< extra_info */ | |
2926 &pref_info, /**< pref info */ | |
2927 #else | |
2928 &ui_info, /**< ui_info */ | 2733 &ui_info, /**< ui_info */ |
2929 NULL, /**< extra_info */ | 2734 NULL, /**< extra_info */ |
2930 NULL, /**< pref info */ | 2735 NULL, /**< pref info */ |
2931 #endif | |
2932 NULL | 2736 NULL |
2933 }; | 2737 }; |
2934 | 2738 |
2935 static void | 2739 static void |
2936 init_plugin(PurplePlugin *plugin) | 2740 init_plugin(PurplePlugin *plugin) |