| 2825 } |
2833 } |
| 2826 |
2834 |
| 2827 return ret; |
2835 return ret; |
| 2828 } |
2836 } |
| 2829 |
2837 |
| 2830 static GtkWidget * |
2838 static void |
| 2831 logging_page(void) |
2839 bind_logging_page(PidginPrefsWindow *win) |
| 2832 { |
2840 { |
| 2833 GtkWidget *ret; |
|
| 2834 GtkWidget *vbox; |
|
| 2835 GList *names; |
2841 GList *names; |
| 2836 |
2842 |
| 2837 ret = gtk_box_new(GTK_ORIENTATION_VERTICAL, PIDGIN_HIG_CAT_SPACE); |
2843 win->logging.format.type = PURPLE_PREF_STRING; |
| 2838 gtk_container_set_border_width (GTK_CONTAINER (ret), PIDGIN_HIG_BORDER); |
2844 win->logging.format.key = "/purple/logging/format"; |
| 2839 |
|
| 2840 |
|
| 2841 vbox = pidgin_make_frame (ret, _("Logging")); |
|
| 2842 names = purple_log_logger_get_options(); |
2845 names = purple_log_logger_get_options(); |
| 2843 |
2846 pidgin_prefs_bind_dropdown_from_list(&win->logging.format, names); |
| 2844 pidgin_prefs_dropdown_from_list(vbox, _("Log _format:"), PURPLE_PREF_STRING, |
|
| 2845 "/purple/logging/format", names); |
|
| 2846 |
|
| 2847 g_list_free(names); |
2847 g_list_free(names); |
| 2848 |
2848 |
| 2849 pidgin_prefs_checkbox(_("Log all _instant messages"), |
2849 pidgin_prefs_bind_checkbox("/purple/logging/log_ims", |
| 2850 "/purple/logging/log_ims", vbox); |
2850 win->logging.log_ims); |
| 2851 pidgin_prefs_checkbox(_("Log all c_hats"), |
2851 pidgin_prefs_bind_checkbox("/purple/logging/log_chats", |
| 2852 "/purple/logging/log_chats", vbox); |
2852 win->logging.log_chats); |
| 2853 pidgin_prefs_checkbox(_("Log all _status changes to system log"), |
2853 pidgin_prefs_bind_checkbox("/purple/logging/log_system", |
| 2854 "/purple/logging/log_system", vbox); |
2854 win->logging.log_system); |
| 2855 |
|
| 2856 gtk_widget_show_all(ret); |
|
| 2857 |
|
| 2858 return ret; |
|
| 2859 } |
2855 } |
| 2860 |
2856 |
| 2861 /*** keyring page *******************************************************/ |
2857 /*** keyring page *******************************************************/ |
| 2862 |
2858 |
| 2863 static void |
2859 static void |
| 4153 |
4149 |
| 4154 static int |
4150 static int |
| 4155 prefs_notebook_add_page(GtkNotebook *notebook, const char *text, |
4151 prefs_notebook_add_page(GtkNotebook *notebook, const char *text, |
| 4156 GtkWidget *page, int ind) |
4152 GtkWidget *page, int ind) |
| 4157 { |
4153 { |
| 4158 return gtk_notebook_append_page(notebook, page, gtk_label_new(text)); |
4154 return gtk_notebook_insert_page(notebook, page, gtk_label_new(text), ind); |
| 4159 } |
4155 } |
| 4160 |
4156 |
| 4161 static void |
4157 static void |
| 4162 prefs_notebook_init(PidginPrefsWindow *win) |
4158 prefs_notebook_init(PidginPrefsWindow *win) |
| 4163 { |
4159 { |
| 4172 if(purple_running_osx() == FALSE) |
4168 if(purple_running_osx() == FALSE) |
| 4173 prefs_notebook_add_page(notebook, _("Browser"), browser_page(), notebook_page++); |
4169 prefs_notebook_add_page(notebook, _("Browser"), browser_page(), notebook_page++); |
| 4174 #endif |
4170 #endif |
| 4175 |
4171 |
| 4176 prefs_notebook_add_page(notebook, _("Conversations"), conv_page(), notebook_page++); |
4172 prefs_notebook_add_page(notebook, _("Conversations"), conv_page(), notebook_page++); |
| 4177 prefs_notebook_add_page(notebook, _("Logging"), logging_page(), notebook_page++); |
4173 bind_logging_page(win); |
| |
4174 notebook_page++; |
| 4178 prefs_notebook_add_page(notebook, _("Network"), network_page(), notebook_page++); |
4175 prefs_notebook_add_page(notebook, _("Network"), network_page(), notebook_page++); |
| 4179 prefs_notebook_add_page(notebook, _("Proxy"), proxy_page(), notebook_page++); |
4176 prefs_notebook_add_page(notebook, _("Proxy"), proxy_page(), notebook_page++); |
| 4180 prefs_notebook_add_page(notebook, _("Password Storage"), keyring_page(), notebook_page++); |
4177 prefs_notebook_add_page(notebook, _("Password Storage"), keyring_page(), notebook_page++); |
| 4181 |
4178 |
| 4182 prefs_notebook_add_page(notebook, _("Sounds"), sound_page(), notebook_page++); |
4179 prefs_notebook_add_page(notebook, _("Sounds"), sound_page(), notebook_page++); |
| 4195 gtk_widget_class_set_template_from_resource( |
4192 gtk_widget_class_set_template_from_resource( |
| 4196 widget_class, |
4193 widget_class, |
| 4197 "/im/pidgin/Pidgin/Prefs/prefs.ui" |
4194 "/im/pidgin/Pidgin/Prefs/prefs.ui" |
| 4198 ); |
4195 ); |
| 4199 |
4196 |
| |
4197 /* Main window */ |
| 4200 gtk_widget_class_bind_template_child( |
4198 gtk_widget_class_bind_template_child( |
| 4201 widget_class, PidginPrefsWindow, notebook); |
4199 widget_class, PidginPrefsWindow, notebook); |
| 4202 gtk_widget_class_bind_template_callback(widget_class, delete_prefs); |
4200 gtk_widget_class_bind_template_callback(widget_class, delete_prefs); |
| |
4201 |
| |
4202 /* Logging page */ |
| |
4203 gtk_widget_class_bind_template_child( |
| |
4204 widget_class, PidginPrefsWindow, logging.format.combo); |
| |
4205 gtk_widget_class_bind_template_child( |
| |
4206 widget_class, PidginPrefsWindow, logging.log_ims); |
| |
4207 gtk_widget_class_bind_template_child( |
| |
4208 widget_class, PidginPrefsWindow, logging.log_chats); |
| |
4209 gtk_widget_class_bind_template_child( |
| |
4210 widget_class, PidginPrefsWindow, logging.log_system); |
| 4203 } |
4211 } |
| 4204 |
4212 |
| 4205 static void |
4213 static void |
| 4206 pidgin_prefs_window_init(PidginPrefsWindow *win) |
4214 pidgin_prefs_window_init(PidginPrefsWindow *win) |
| 4207 { |
4215 { |