[pan2] - status icon fix - usability fixes for prefs-ui - fixes bugs mentioned by pkovar
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2] - status icon fix - usability fixes for prefs-ui - fixes bugs mentioned by pkovar
- Date: Wed, 4 Jan 2012 15:59:42 +0000 (UTC)
commit 0785aa019f65a87291b79252a312f6392fb9c22c
Author: Heinrich MÃller <henmull src gnome org>
Date: Wed Jan 4 12:07:55 2012 +0100
- status icon fix
- usability fixes for prefs-ui
- fixes bugs mentioned by pkovar
pan/gui/actions.cc | 18 ++----
pan/gui/body-pane.cc | 5 +-
pan/gui/e-action-combo-box.h | 1 +
pan/gui/gui.cc | 39 +++++++++++---
pan/gui/pan.cc | 114 ++++++++++++++++++++++++++++++++++--------
pan/gui/pan.ui.h | 3 -
pan/gui/post-ui.cc | 33 ++++++++----
pan/gui/prefs-ui.cc | 76 ++++++++++++++++-----------
8 files changed, 200 insertions(+), 89 deletions(-)
---
diff --git a/pan/gui/actions.cc b/pan/gui/actions.cc
index 3d5f434..f48de02 100644
--- a/pan/gui/actions.cc
+++ b/pan/gui/actions.cc
@@ -263,9 +263,6 @@ namespace
GtkActionEntry entries[] =
{
- // dummy
- { "set-charset", NULL, "", NULL, NULL, NULL },
-
{ "file-menu", NULL, N_("_File"), NULL, NULL, NULL },
{ "edit-menu", NULL, N_("_Edit"), NULL, NULL, NULL },
{ "view-layout-menu", NULL, N_("_Layout"), NULL, NULL, NULL },
@@ -427,14 +424,6 @@ namespace
NULL,
G_CALLBACK(do_show_servers_dialog) },
-#ifdef HAVE_GNUTLS
- { "show-sec-dialog", GTK_STOCK_DIALOG_AUTHENTICATION,
- N_("Edit _SSL Certificates"), NULL,
- NULL,
- G_CALLBACK(do_show_sec_dialog) },
-#else
- { "show-sec-dialog", NULL, NULL, NULL, NULL, NULL},
-#endif
{ "jump-to-group-tab", GTK_STOCK_JUMP_TO,
N_("Jump to _Group Tab"), "1",
NULL,
@@ -668,7 +657,12 @@ namespace
{ "about-pan", GTK_STOCK_ABOUT,
N_("_About"), NULL,
NULL,
- G_CALLBACK(do_about_pan) }
+ G_CALLBACK(do_about_pan) },
+
+ { "show-sec-dialog", GTK_STOCK_DIALOG_AUTHENTICATION,
+ N_("Edit _SSL Certificates"), NULL,
+ NULL,
+ G_CALLBACK(do_show_sec_dialog) },
};
void prefs_toggle_callback_impl (GtkToggleAction * action)
diff --git a/pan/gui/body-pane.cc b/pan/gui/body-pane.cc
index f2e2c9c..9bf4a0f 100644
--- a/pan/gui/body-pane.cc
+++ b/pan/gui/body-pane.cc
@@ -1009,8 +1009,9 @@ BodyPane :: append_part (GMimeObject * parent, GMimeObject * obj, GtkAllocation
char * pch = (filename && *filename)
? g_strdup_printf ("%s", filename)
: g_strdup_printf (_("Unnamed File"));
+
add_attachment_to_toolbar (pch);
- std::cerr<<"add attach "<<pch<<"\n";
+
_freeme.insert(pch);
}
}
@@ -1644,7 +1645,7 @@ BodyPane :: create_attachments_toolbar (GtkWidget* frame)
_cur_row = 0;
GtkWidget * w = _att_toolbar = gtk_table_new(4,1,TRUE);
- gtk_widget_set_size_request (w, -1, 40);
+ gtk_widget_set_size_request (w, -1, 20);
gtk_table_set_col_spacings (GTK_TABLE(w), PAD);
gtk_container_add (GTK_CONTAINER (frame), w);
gtk_widget_show_all (frame);
diff --git a/pan/gui/e-action-combo-box.h b/pan/gui/e-action-combo-box.h
index bcf22c9..0872747 100644
--- a/pan/gui/e-action-combo-box.h
+++ b/pan/gui/e-action-combo-box.h
@@ -58,6 +58,7 @@ struct _EActionComboBox {
// quick fix for error : "specified instance size for type `EActionComboBox' is
// smaller than the parent type's `GtkComboBox' instance size"
double pad;
+ double pad2;
};
struct _EActionComboBoxClass {
diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc
index da0c515..13d12d9 100644
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@ -54,7 +54,13 @@ extern "C" {
#include "log-ui.h"
#include "gui.h"
#include "pad.h"
-#include "pan.ui.h"
+
+#ifdef HAVE_GNUTLS
+ #include "pan.ui.ssl.h"
+#else
+ #include "pan.ui.h"
+
+#endif
#include "prefs-ui.h"
#include "progress-view.h"
#include "profiles-dialog.h"
@@ -355,20 +361,25 @@ namespace
GUI :: ~GUI ()
{
- _certstore.remove_listener(this);
- _data.remove_listener(this);
- _prefs.remove_listener (this);
- _queue.remove_listener (this);
- Log::get().remove_listener (this);
+ std::cerr<<"dtor gui\n";
const std::string accel_filename (get_accel_filename());
gtk_accel_map_save (accel_filename.c_str());
::chmod (accel_filename.c_str(), 0600);
+ int res(0);
+
if (hpane)
- _prefs.set_int ("main-window-hpane-position", gtk_paned_get_position(GTK_PANED(hpane)));
+ {
+ res = gtk_paned_get_position(GTK_PANED(hpane));
+ if (res > 0) _prefs.set_int ("main-window-hpane-position", res);
+ }
if (vpane)
- _prefs.set_int ("main-window-vpane-position", gtk_paned_get_position(GTK_PANED(vpane)));
+ {
+ res = gtk_paned_get_position(GTK_PANED(vpane));
+ if (res > 0) _prefs.set_int ("main-window-vpane-position", res);
+ }
+
const bool maximized = gtk_widget_get_window(_root)
&& (gdk_window_get_state( gtk_widget_get_window(_root)) & GDK_WINDOW_STATE_MAXIMIZED);
@@ -387,6 +398,7 @@ GUI :: ~GUI ()
delete _header_pane;
delete _group_pane;
delete _body_pane;
+
for (size_t i(0), size(_views.size()); i!=size; ++i)
delete _views[i];
@@ -395,7 +407,15 @@ GUI :: ~GUI ()
g_object_unref (G_OBJECT(_ui_manager));
deinit_gpg();
+
if (iconv_inited) iconv_close(conv);
+
+ _certstore.remove_listener(this);
+ _data.remove_listener(this);
+ _prefs.remove_listener (this);
+ _queue.remove_listener (this);
+ Log::get().remove_listener (this);
+
}
/***
@@ -1581,6 +1601,9 @@ namespace
GtkWidget* pack_widgets (Prefs& prefs, GtkWidget * w1, GtkWidget * w2, int orient, gint uglyhack_idx)
{
+
+ std::cerr<<"pack widgets\n";
+
GtkWidget * w;
if (w1!=NULL && w2!=NULL) {
int pos = uglyhack_idx==0
diff --git a/pan/gui/pan.cc b/pan/gui/pan.cc
index fd85c70..0058b47 100644
--- a/pan/gui/pan.cc
+++ b/pan/gui/pan.cc
@@ -114,7 +114,10 @@ namespace
{
Prefs* prefs (static_cast<Prefs*>(user_data));
if(prefs->get_flag ("status-icon", true))
+ {
gtk_widget_hide(w);
+ gtk_window_iconify (GTK_WINDOW(w));
+ }
else
mainloop_quit ();
return true; // don't invoke the default handler that destroys the widget
@@ -205,13 +208,17 @@ namespace
}
StatusIconListener(GtkStatusIcon * i, GtkWidget* r, Prefs& p, Queue& q, Data& d, bool v) : icon(i), root(r), prefs(p), queue(q), data(d),
- tasks_active(0), tasks_total(0), is_online(false), minimized(v)
+ tasks_active(0), tasks_total(0), minimized(v)
{
prefs.add_listener(this);
queue.add_listener(this);
data.add_listener(this);
update_status_tooltip();
status_icon_timeout_tag = g_timeout_add (500, status_icon_periodic_refresh, this);
+
+ is_online = q.is_online();
+
+ update_status_icon(ICON_STATUS_IDLE);
}
~StatusIconListener()
@@ -243,6 +250,7 @@ namespace
tasks_active, tasks_total, queue.get_speed_KiBps());
gtk_status_icon_set_tooltip_markup(icon, buf);
}
+
void update_status_icon(StatusIcons si)
{
if (si==ICON_STATUS_IDLE)
@@ -356,41 +364,63 @@ namespace
};
static StatusIconListener* _status_icon;
+ static bool iconified = false;
+
/* ****** End Status Icon ******************************************************/
void status_icon_activate (GtkStatusIcon *icon, gpointer data)
{
-// gtk_widget_show(GTK_WIDGET(data));
-// gtk_window_deiconify(GTK_WINDOW(data));
GtkWindow * window = GTK_WINDOW(data);
- if(gtk_window_is_active (window))
- gtk_widget_hide ((GtkWidget *) window);
- else {
- gtk_widget_hide ((GtkWidget *) window); // dirty hack
- gtk_widget_show ((GtkWidget *) window);
+
+ if (gtk_window_is_active(window))
+ {
+ gtk_window_iconify (window);
+ gtk_widget_hide (GTK_WIDGET(window));
+ }
+ else
+ {
+ gtk_window_deiconify(window);
+ gtk_widget_hide(GTK_WIDGET(window));
+ gtk_widget_show (GTK_WIDGET(window));
}
+
}
static gboolean window_state_event (GtkWidget *widget, GdkEventWindowState *event, gpointer trayIcon)
{
+
StatusIconListener* l(static_cast<StatusIconListener*>(trayIcon));
- if (!l->prefs.get_flag("status-icon",false)) return TRUE;
- if(event->changed_mask == GDK_WINDOW_STATE_ICONIFIED && (event->new_window_state == GDK_WINDOW_STATE_ICONIFIED ||
- event->new_window_state == (GDK_WINDOW_STATE_ICONIFIED | GDK_WINDOW_STATE_MAXIMIZED)))
+ if(event->changed_mask == GDK_WINDOW_STATE_ICONIFIED
+ && (event->new_window_state == GDK_WINDOW_STATE_ICONIFIED
+ || event->new_window_state == (GDK_WINDOW_STATE_ICONIFIED | GDK_WINDOW_STATE_MAXIMIZED)))
{
- gtk_widget_hide (GTK_WIDGET(widget));
gtk_status_icon_set_visible(GTK_STATUS_ICON(l->icon), TRUE);
+ gtk_widget_hide (GTK_WIDGET(widget));
}
- else if(event->changed_mask == GDK_WINDOW_STATE_WITHDRAWN && (event->new_window_state == GDK_WINDOW_STATE_ICONIFIED ||
- event->new_window_state == (GDK_WINDOW_STATE_ICONIFIED | GDK_WINDOW_STATE_MAXIMIZED)))
+ else if(event->changed_mask == GDK_WINDOW_STATE_WITHDRAWN
+ && (event->new_window_state == GDK_WINDOW_STATE_ICONIFIED
+ || event->new_window_state == (GDK_WINDOW_STATE_ICONIFIED | GDK_WINDOW_STATE_MAXIMIZED)))
{
gtk_status_icon_set_visible(GTK_STATUS_ICON(l->icon), FALSE);
}
return TRUE;
}
+ struct QueueAndGui
+ {
+ Queue& queue;
+ GUI& gui;
+ QueueAndGui (Queue& q, GUI& g) : queue(q), gui(g) {}
+ };
+
+ static void work_online_cb (GtkWidget* w, gpointer data)
+ {
+ QueueAndGui* d = static_cast<QueueAndGui*>(data);
+ d->gui.do_work_online(!d->queue.is_online());
+ }
+
void status_icon_popup_menu (GtkStatusIcon *icon,
guint button,
guint activation_time,
@@ -400,35 +430,58 @@ namespace
gtk_menu_popup(menu, NULL, NULL, NULL, NULL, button, activation_time);
}
- void run_pan_with_status_icon (GtkWindow * window, GdkPixbuf * pixbuf, Queue& queue, Prefs & prefs, Data& data)
+ static QueueAndGui* queue_and_gui(0);
+
+ void run_pan_with_status_icon (GtkWindow * window, GdkPixbuf * pixbuf, Queue& queue, Prefs & prefs, Data& data, GUI* _gui)
{
+
+ GUI& gui (*_gui);
+
for (guint i=0; i<NUM_STATUS_ICONS; ++i)
status_icons[i].pixbuf = gdk_pixbuf_new_from_inline (-1, status_icons[i].pixbuf_txt, FALSE, 0);
GtkStatusIcon * icon = gtk_status_icon_new_from_pixbuf (status_icons[ICON_STATUS_IDLE].pixbuf);
GtkWidget * menu = gtk_menu_new ();
+
GtkWidget * menu_quit = gtk_image_menu_item_new_from_stock ( GTK_STOCK_QUIT, NULL);
+ g_signal_connect(menu_quit, "activate", G_CALLBACK(mainloop_quit), NULL);
+
gtk_status_icon_set_visible(icon, prefs.get_flag("status-icon", false));
StatusIconListener* pl = _status_icon = new StatusIconListener(icon, GTK_WIDGET(window), prefs, queue, data, prefs.get_flag("start-minimized", false));
+
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_quit);
+
+ const char* label_names[] = {"Toggle on/offline"};
+
+ GtkWidget* labels[G_N_ELEMENTS(label_names)];
+
+ labels[0] = gtk_menu_item_new_with_label(label_names[0]);
+ queue_and_gui = new QueueAndGui(queue, gui);
+ g_signal_connect(labels[0], "activate", G_CALLBACK(work_online_cb), queue_and_gui);
+
+ for (int i=0; i < G_N_ELEMENTS(label_names); ++i)
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), labels[i]);
+
gtk_widget_show_all(menu);
g_signal_connect(icon, "activate", G_CALLBACK(status_icon_activate), window);
g_signal_connect(icon, "popup-menu", G_CALLBACK(status_icon_popup_menu), menu);
- g_signal_connect(menu_quit, "activate", G_CALLBACK(mainloop_quit), NULL);
g_signal_connect (G_OBJECT (window), "window-state-event", G_CALLBACK (window_state_event), pl);
}
- void run_pan_in_window (Data & data,
+ void run_pan_in_window (GUI * _gui,
+ Data & data,
Queue & queue,
Prefs & prefs,
GroupPrefs & group_prefs,
GtkWindow * window)
{
- {
+// {
+
+ GUI& gui (*_gui);
+
const gulong delete_cb_id = g_signal_connect (window, "delete-event", G_CALLBACK(delete_event_cb), &prefs);
- GUI gui (data, queue, prefs, group_prefs);
gtk_container_add (GTK_CONTAINER(window), gui.root());
const bool minimized(prefs.get_flag("start-minimized", false));
if (minimized) gtk_window_iconify (window);
@@ -457,7 +510,9 @@ namespace
register_shutdown_signals ();
mainloop ();
g_signal_handler_disconnect (window, delete_cb_id);
- }
+// }
+
+ delete _gui;
gtk_widget_destroy (GTK_WIDGET(window));
}
@@ -482,6 +537,7 @@ namespace
void on_queue_connection_count_changed (Queue&, int) {}
void on_queue_online_changed (Queue&, bool) {}
void on_queue_error (Queue&, const StringView&) {}
+
private:
Queue & q;
};
@@ -722,6 +778,11 @@ _("General Options\n"
#endif
}
+namespace
+{
+ GUI * gui_ptr (0);
+}
+
int
main (int argc, char *argv[])
@@ -777,6 +838,7 @@ main (int argc, char *argv[])
#ifdef DEBUG_LOCALE
setlocale(LC_ALL,"C");
#endif
+
if (verbosed && !gui && nzb)
_verbose_flag = true;
@@ -906,13 +968,19 @@ main (int argc, char *argv[])
gtk_window_set_title (GTK_WINDOW(window), "Pan");
gtk_window_set_resizable (GTK_WINDOW(window), true);
gtk_window_set_default_icon (pixbuf);
- run_pan_with_status_icon(GTK_WINDOW(window), pixbuf, queue, prefs, data);
+
+
+ gui_ptr = new GUI (data, queue, prefs, group_prefs);
+
+ run_pan_with_status_icon(GTK_WINDOW(window), pixbuf, queue, prefs, data, gui_ptr);
+
g_object_unref (pixbuf);
+
#ifdef HAVE_LIBNOTIFY
if (!notify_is_initted ())
notify_init (_("Pan notification"));
#endif
- run_pan_in_window (data, queue, prefs, group_prefs, GTK_WINDOW(window));
+ run_pan_in_window (gui_ptr, data, queue, prefs, group_prefs, GTK_WINDOW(window));
}
#ifdef HAVE_DBUS
@@ -929,6 +997,8 @@ main (int argc, char *argv[])
cache.clear ();
encode_cache.clear();
}
+
+ delete queue_and_gui;
}
g_mime_shutdown ();
diff --git a/pan/gui/pan.ui.h b/pan/gui/pan.ui.h
index ad6bc23..d9904c1 100644
--- a/pan/gui/pan.ui.h
+++ b/pan/gui/pan.ui.h
@@ -20,7 +20,6 @@ const char * fallback_ui_file =
" <menuitem action='select-article-body' />\n"
" <separator />\n"
" <menuitem action='show-servers-dialog' />\n"
-" <menuitem action='show-sec-dialog' />\n"
" <menuitem action='show-profiles-dialog' />\n"
" <menuitem action='show-preferences-dialog' />\n"
" <menuitem action='show-group-preferences-dialog' />\n"
@@ -73,8 +72,6 @@ const char * fallback_ui_file =
" <separator />\n"
" <menuitem action='size-pictures-to-fit'/>\n"
" <menuitem action='focus-on-image'/>\n"
-" <separator />\n"
-" <menuitem action='set-charset' />\n"
" </menu>\n"
" </menu>\n"
" <menu action='go-menu'>\n"
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index 612ae1f..7ec9f97 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -298,14 +298,15 @@ PostUI :: set_spellcheck_enabled (bool enabled)
}
}
#else
- GtkWidget * w = gtk_message_dialog_new_with_markup (
- GTK_WINDOW(_root),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- _("<b>Spellchecker not found!</b>\n \nWas this copy of Pan compiled with GtkSpell enabled?"));
- g_signal_connect_swapped (w, "response", G_CALLBACK (gtk_widget_destroy), w);
- gtk_widget_show_all (w);
+ // disable this for now, it is annoying
+// GtkWidget * w = gtk_message_dialog_new_with_markup (
+// GTK_WINDOW(_root),
+// GTK_DIALOG_DESTROY_WITH_PARENT,
+// GTK_MESSAGE_ERROR,
+// GTK_BUTTONS_CLOSE,
+// _("<b>Spellchecker not found!</b>\n \nWas this copy of Pan compiled with GtkSpell enabled?"));
+// g_signal_connect_swapped (w, "response", G_CALLBACK (gtk_widget_destroy), w);
+// gtk_widget_show_all (w);
#endif
}
else // disable
@@ -854,6 +855,9 @@ PostUI :: send_and_save_now ()
HIG :: message_dialog_set_text (GTK_MESSAGE_DIALOG(d),
_("The file queue is empty, so no files can be saved."),"");
gtk_dialog_add_button (GTK_DIALOG(d), _("Go Back"), GTK_RESPONSE_CANCEL);
+ gtk_dialog_run(GTK_DIALOG(d));
+ gtk_widget_destroy(d);
+ return;
} else
_save_file = prompt_user_for_upload_nzb_dir (GTK_WINDOW(_root), _prefs);
@@ -2469,7 +2473,7 @@ PostUI :: create_filequeue_tab ()
gtk_box_pack_start (GTK_BOX(vbox), gtk_hseparator_new(), false, false, 0);
//add filestore
- list_store = gtk_list_store_new (4, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_FLOAT);
+ list_store = gtk_list_store_new (4, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_STRING);
w = _filequeue_store = gtk_tree_view_new_with_model (GTK_TREE_MODEL(list_store));
// add columns
@@ -2864,15 +2868,22 @@ PostUI :: update_parts_tab()
gtk_list_store_clear(store);
gboolean res(FALSE);
- for (int i=1;i<=_total_parts;++i)
+ GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(w));
+ g_object_ref(model);
+ gtk_tree_view_set_model(GTK_TREE_VIEW(w), NULL);
+
+ for (int i=1;i<=_upload_ptr->_total_parts;++i)
{
gtk_list_store_append (store, &iter);
res = (_upload_ptr->_wanted.find(i) != _upload_ptr->_wanted.end()) ? TRUE : FALSE;
gtk_list_store_set (store, &iter,
0, i,
1, res,
- 2, _upload_ptr->_basename.c_str(), -1);
+ 2, _upload_ptr->_basename.c_str(),
+ -1);
}
+ gtk_tree_view_set_model(GTK_TREE_VIEW(w), model);
+ g_object_unref(model);
}
gboolean
diff --git a/pan/gui/prefs-ui.cc b/pan/gui/prefs-ui.cc
index f96550e..b28ab29 100644
--- a/pan/gui/prefs-ui.cc
+++ b/pan/gui/prefs-ui.cc
@@ -574,41 +574,55 @@ PrefsDialog :: PrefsDialog (Prefs& prefs, GtkWindow* parent):
gtk_label_set_mnemonic_widget(GTK_LABEL(l), w);
HIG::workarea_add_row (t, &row, w, l);
HIG::workarea_add_section_divider (t, &row);
- HIG :: workarea_add_section_title (t, &row, _("Autosave Articles"));
- w = new_spin_button ("newsrc-autosave-timeout-min", 0, 60, prefs);
- l = gtk_label_new(_("Minutes to autosave newsrc files"));
- gtk_misc_set_alignment (GTK_MISC(l), 0.0, 0.5);
- gtk_label_set_mnemonic_widget(GTK_LABEL(l), w);
- HIG::workarea_add_row (t, &row, w, l);
- HIG::workarea_add_section_divider (t, &row);
+ HIG :: workarea_finish (t, &row);
+ gtk_notebook_append_page (GTK_NOTEBOOK(notebook), t, gtk_label_new_with_mnemonic(_("_Behavior")));
+
+ //charset
+ t = HIG :: workarea_create ();
+ HIG :: workarea_add_section_spacer (t, row, 1);
HIG :: workarea_add_section_title (t, &row, _("Language Settings"));
- HIG :: workarea_add_section_spacer (t, row, 2);
- w = gtk_button_new_from_stock (GTK_STOCK_SELECT_FONT);
- l = charset_label = gtk_label_new (NULL);
- gtk_misc_set_alignment (GTK_MISC(l), 0.0, 0.0);
- update_default_charset_label(_prefs.get_string("default-charset","UTF-8"));
- g_signal_connect (w, "clicked", G_CALLBACK(select_prefs_charset_cb), this);
- HIG::workarea_add_row (t, &row, w, l);
- HIG::workarea_add_section_divider (t, &row);
- HIG :: workarea_add_section_title (t, &row, _("Autosave Article Draft"));
- w = new_spin_button ("draft-autosave-timeout-min", 0, 60, prefs);
- l = gtk_label_new(_("Minutes to autosave the current Article Draft."));
- gtk_misc_set_alignment (GTK_MISC(l), 0.0, 0.5);
- gtk_label_set_mnemonic_widget(GTK_LABEL(l), w);
- HIG::workarea_add_row (t, &row, w, l);
- HIG::workarea_add_section_divider (t, &row);
- HIG :: workarea_add_section_title (t, &row, _("System Tray Behavior"));
- HIG :: workarea_add_section_spacer (t, row, 2);
- w = new_check_button (_("Hide to system tray"), "status-icon", false, prefs);
- HIG :: workarea_add_wide_control (t, &row, w);
- w = new_check_button (_("Start Pan minimized"), "start-minimized", false, prefs);
- HIG :: workarea_add_wide_control (t, &row, w);
+ w = gtk_button_new_from_stock (GTK_STOCK_SELECT_FONT);
+ l = charset_label = gtk_label_new (NULL);
+ gtk_misc_set_alignment (GTK_MISC(l), 0.0, 0.0);
+ update_default_charset_label(_prefs.get_string("default-charset","UTF-8"));
+ g_signal_connect (w, "clicked", G_CALLBACK(select_prefs_charset_cb), this);
+ HIG::workarea_add_row (t, &row, w, l);
+ HIG :: workarea_finish (t, &row);
+ gtk_notebook_append_page (GTK_NOTEBOOK(notebook), t, gtk_label_new_with_mnemonic(_("_Charset")));
+
+ // systray and notify popup
+ t = HIG :: workarea_create ();
+ HIG :: workarea_add_section_title (t, &row, _("System Tray Behavior"));
+ HIG :: workarea_add_section_spacer (t, row, 3);
+ w = new_check_button (_("Hide to system tray"), "status-icon", false, prefs);
+ HIG :: workarea_add_wide_control (t, &row, w);
+ w = new_check_button (_("Start Pan minimized"), "start-minimized", false, prefs);
+ HIG :: workarea_add_wide_control (t, &row, w);
#ifdef HAVE_LIBNOTIFY
- w = new_check_button (_("Show notifications"), "use-notify", false, prefs);
- HIG :: workarea_add_wide_control (t, &row, w);
+ w = new_check_button (_("Show notifications"), "use-notify", false, prefs);
+ HIG :: workarea_add_wide_control (t, &row, w);
#endif
HIG :: workarea_finish (t, &row);
- gtk_notebook_append_page (GTK_NOTEBOOK(notebook), t, gtk_label_new_with_mnemonic(_("_Behavior")));
+ gtk_notebook_append_page (GTK_NOTEBOOK(notebook), t, gtk_label_new_with_mnemonic(_("_Status and Notifications")));
+
+ // Autosave Features
+ t = HIG :: workarea_create ();
+ HIG :: workarea_add_section_spacer (t, row, 2);
+ HIG :: workarea_add_section_title (t, &row, _("Autosave Article Draft"));
+ w = new_spin_button ("draft-autosave-timeout-min", 0, 60, prefs);
+ l = gtk_label_new(_("Minutes to autosave the current Article Draft."));
+ gtk_misc_set_alignment (GTK_MISC(l), 0.0, 0.5);
+ gtk_label_set_mnemonic_widget(GTK_LABEL(l), w);
+ HIG::workarea_add_row (t, &row, w, l);
+ HIG::workarea_add_section_divider (t, &row);
+ HIG :: workarea_add_section_title (t, &row, _("Autosave Articles"));
+ w = new_spin_button ("newsrc-autosave-timeout-min", 0, 60, prefs);
+ l = gtk_label_new(_("Minutes to autosave newsrc files"));
+ gtk_misc_set_alignment (GTK_MISC(l), 0.0, 0.5);
+ gtk_label_set_mnemonic_widget(GTK_LABEL(l), w);
+ HIG::workarea_add_row (t, &row, w, l);
+ HIG :: workarea_finish (t, &row);
+ gtk_notebook_append_page (GTK_NOTEBOOK(notebook), t, gtk_label_new_with_mnemonic(_("_Autosave")));
// Layout
row = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]