Yasumichi Akahoshi
yasum****@users*****
2005年 9月 8日 (木) 23:05:04 JST
Index: cxplorer/src/cxp-pref-dialog.c diff -u cxplorer/src/cxp-pref-dialog.c:1.7 cxplorer/src/cxp-pref-dialog.c:1.8 --- cxplorer/src/cxp-pref-dialog.c:1.7 Tue Aug 30 23:49:16 2005 +++ cxplorer/src/cxp-pref-dialog.c Thu Sep 8 23:05:04 2005 @@ -5,7 +5,7 @@ * A widget of Property dialog * @author Yasumichi Akahoshi <yasum****@users*****> * @date Sun Apr 3 02:53:00 2005 - * $Revision: 1.7 $ + * $Revision: 1.8 $ ****************************************************************************/ #ifdef HAVE_CONFIG_H @@ -44,6 +44,7 @@ typedef struct { GConfClient *client; + GtkWidget *ml_entry; GtkWidget *entry[ENTRY_COUNT]; gboolean dispose_has_run; } CxpPrefDialogPrivate; @@ -130,15 +131,20 @@ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(self)->vbox), notebook, FALSE, FALSE, 0); gtk_widget_show (notebook); - table = gtk_table_new (3, 2, FALSE); + table = gtk_table_new (4, 3, FALSE); + label = gtk_label_new (_("max lines")); + gtk_table_attach_defaults (GTK_TABLE(table), label, 0, 1, 0, 1); + private->ml_entry = gtk_spin_button_new_with_range (1.0, 1000.0, 1.0); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(private->ml_entry), gconf_client_get_int (private->client, "/apps/cxp/cxplorer/PreviewLines", NULL)); + gtk_table_attach_defaults (GTK_TABLE(table), private->ml_entry, 1, 2, 0, 1); for(index=0; index < 3; index++) { label = gtk_label_new (_(entry_title[index])); - gtk_table_attach_defaults (GTK_TABLE(table), label, 0, 1, index, index+1); + gtk_table_attach_defaults (GTK_TABLE(table), label, 0, 1, index+1, index+2); private->entry[index] = gtk_entry_new (); gtk_entry_set_text (GTK_ENTRY(private->entry[index]), gconf_client_get_string (private->client, config_key[index], NULL)); gtk_entry_set_width_chars (GTK_ENTRY(private->entry[index]), 40); - gtk_table_attach_defaults (GTK_TABLE(table), private->entry[index], 1, 2, index, index+1); + gtk_table_attach_defaults (GTK_TABLE(table), private->entry[index], 1, 2, index+1, index+2); } gtk_widget_show_all (table); @@ -213,6 +219,7 @@ CxpPrefDialogPrivate *private = CXP_PREF_DIALOG_GET_PRIVATE(dialog); gint index; + gconf_client_set_int (private->client, "/apps/cxp/cxplorer/PreviewLines", gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(private->ml_entry)), NULL); for (index=0; index<ENTRY_COUNT; index++) { gconf_client_set_string (private->client, config_key[index], g_strdup(gtk_entry_get_text(GTK_ENTRY(private->entry[index]))), NULL);