gedit r6107 - branches/printing/gedit
- From: pborelli svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6107 - branches/printing/gedit
- Date: Tue, 22 Jan 2008 19:59:42 +0000 (GMT)
Author: pborelli
Date: Tue Jan 22 19:59:42 2008
New Revision: 6107
URL: http://svn.gnome.org/viewvc/gedit?rev=6107&view=rev
Log:
get the fontbuttons from glade
Modified:
branches/printing/gedit/gedit-print-job.c
branches/printing/gedit/gedit-print-preferences.glade
Modified: branches/printing/gedit/gedit-print-job.c
==============================================================================
--- branches/printing/gedit/gedit-print-job.c (original)
+++ branches/printing/gedit/gedit-print-job.c Tue Jan 22 19:59:42 2008
@@ -374,22 +374,6 @@
gedit_prefs_manager_set_print_font_numbers (gtk_font_button_get_font_name (fb));
}
-static GtkWidget *
-font_button_new (void)
-{
- GtkWidget *button;
-
- button = gtk_font_button_new ();
-
- gtk_font_button_set_use_font (GTK_FONT_BUTTON (button), TRUE);
- gtk_font_button_set_show_style (GTK_FONT_BUTTON (button), FALSE);
- gtk_font_button_set_show_size (GTK_FONT_BUTTON (button), TRUE);
-
- gtk_widget_show (button);
-
- return button;
-}
-
static GObject *
create_custom_widget_cb (GtkPrintOperation *operation,
GeditPrintJob *job)
@@ -415,8 +399,11 @@
"do_not_split_checkbutton", &job->priv->do_not_split_checkbutton,
"fonts_table", &job->priv->fonts_table,
"body_font_label", &job->priv->body_font_label,
+ "body_fontbutton", &job->priv->body_fontbutton,
"headers_font_label", &job->priv->headers_font_label,
+ "headers_fontbutton", &job->priv->headers_fontbutton,
"numbers_font_label", &job->priv->numbers_font_label,
+ "numbers_fontbutton", &job->priv->numbers_fontbutton,
"restore_button", &job->priv->restore_button,
NULL);
@@ -491,34 +478,8 @@
gtk_widget_set_sensitive (job->priv->do_not_split_checkbutton,
can_set && (wrap_mode != GTK_WRAP_NONE));
- /* Body font button */
- job->priv->body_fontbutton = font_button_new ();
- gtk_table_attach_defaults (GTK_TABLE (job->priv->fonts_table),
- job->priv->body_fontbutton,
- 1, 2, 0, 1);
-
- /* Headers font button */
- job->priv->headers_fontbutton = font_button_new ();
- gtk_table_attach_defaults (GTK_TABLE (job->priv->fonts_table),
- job->priv->headers_fontbutton,
- 1, 2, 2, 3);
-
- /* Numbers font button */
- job->priv->numbers_fontbutton = font_button_new ();
- gtk_table_attach_defaults (GTK_TABLE (job->priv->fonts_table),
- job->priv->numbers_fontbutton,
- 1, 2, 1, 2);
-
- gtk_label_set_mnemonic_widget (GTK_LABEL (job->priv->body_font_label),
- job->priv->body_fontbutton);
- gtk_label_set_mnemonic_widget (GTK_LABEL (job->priv->headers_font_label),
- job->priv->headers_fontbutton);
- gtk_label_set_mnemonic_widget (GTK_LABEL (job->priv->numbers_font_label),
- job->priv->numbers_fontbutton);
-
/* Set initial values */
font = gedit_prefs_manager_get_print_font_body ();
- g_print ("setting body font to %s\n", font);
gtk_font_button_set_font_name (GTK_FONT_BUTTON (job->priv->body_fontbutton),
font);
g_free (font);
Modified: branches/printing/gedit/gedit-print-preferences.glade
==============================================================================
--- branches/printing/gedit/gedit-print-preferences.glade (original)
+++ branches/printing/gedit/gedit-print-preferences.glade Tue Jan 22 19:59:42 2008
@@ -388,10 +388,12 @@
<property name="column_spacing">12</property>
<property name="row_spacing">12</property>
<child>
- <widget class="GtkFontButton" id="fontbutton3">
+ <widget class="GtkFontButton" id="headers_fontbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
+ <property name="use_font">True</property>
+ <property name="show_style">False</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -403,10 +405,12 @@
</packing>
</child>
<child>
- <widget class="GtkFontButton" id="fontbutton2">
+ <widget class="GtkFontButton" id="numbers_fontbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
+ <property name="use_font">True</property>
+ <property name="show_style">False</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -418,10 +422,12 @@
</packing>
</child>
<child>
- <widget class="GtkFontButton" id="fontbutton1">
+ <widget class="GtkFontButton" id="body_fontbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
+ <property name="use_font">True</property>
+ <property name="show_style">False</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -435,7 +441,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">He_aders and footers:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">fontbutton3</property>
+ <property name="mnemonic_widget">headers_fontbutton</property>
</widget>
<packing>
<property name="top_attach">2</property>
@@ -450,7 +456,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Line numbers:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">fontbutton2</property>
+ <property name="mnemonic_widget">numbers_fontbutton</property>
</widget>
<packing>
<property name="top_attach">1</property>
@@ -465,7 +471,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Body:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">fontbutton1</property>
+ <property name="mnemonic_widget">body_fontbutton</property>
</widget>
<packing>
<property name="x_options">GTK_FILL</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]