summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2011-03-15 17:11:40 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2011-03-15 17:11:40 +0100
commitc5ae380aa5e2f29f15f40ad9478e4082d28ba0a6 (patch)
treebd8ec7b286c9932d32d8602eed78c8582b4adae4 /src
parent74bc7838c0b375244bbe8696c6032162044f24ce (diff)
downloadabrt-c5ae380aa5e2f29f15f40ad9478e4082d28ba0a6.tar.gz
abrt-c5ae380aa5e2f29f15f40ad9478e4082d28ba0a6.tar.xz
abrt-c5ae380aa5e2f29f15f40ad9478e4082d28ba0a6.zip
gui-wizard-gtk: simplified the code a bit
Diffstat (limited to 'src')
-rw-r--r--src/gui-wizard-gtk/wizard.c27
-rw-r--r--src/gui-wizard-gtk/wizard.glade70
2 files changed, 74 insertions, 23 deletions
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 9cb5a9b1..0a2a6043 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -1225,23 +1225,6 @@ static void add_pages(void)
pages[i].page_widget = page;
- /* add a configure button wherever it makes sense to configure events */
- if (i == PAGENO_ANALYZE_SELECTOR
- ||i == PAGENO_REPORTER_SELECTOR)
- {
- GtkWidget *configure = gtk_button_new_from_stock(GTK_STOCK_PREFERENCES);
- g_signal_connect(G_OBJECT(configure), "clicked", G_CALLBACK(on_show_event_list_cb), NULL);
- GtkWidget *align = gtk_alignment_new(0, 0, 0, 0);
- GtkWidget *hbutton_box = gtk_hbox_new(false, 0);
-
- gtk_box_pack_start(GTK_BOX(hbutton_box), configure, false, false, 0);
- gtk_box_pack_start(GTK_BOX(hbutton_box), align, false, true, 0);
-
- //we can do this only because we know that the page is gtk_vbox
- gtk_box_pack_start(GTK_BOX(page), hbutton_box, false, false, 0);
- gtk_widget_show_all(hbutton_box);
- }
-
gtk_assistant_append_page(g_assistant, page);
/* If we set all pages to complete the wizard thinks there is nothing
* to do and shows the button "Last" which allows user to skip all pages
@@ -1286,6 +1269,16 @@ static void add_pages(void)
//gtk_assistant_set_page_complete(g_assistant, pages[PAGENO_REPORTER_SELECTOR].page_widget, false);
gtk_assistant_set_page_complete(g_assistant, pages[PAGENO_BACKTRACE_APPROVAL].page_widget,
gtk_toggle_button_get_active(g_tb_approve_bt));
+
+ /* configure btn on select analyzers page */
+ GtkWidget *config_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button_cfg1"));
+ if (config_btn)
+ g_signal_connect(G_OBJECT(config_btn), "clicked", G_CALLBACK(on_show_event_list_cb), NULL);
+
+ /* configure btn on select reporters page */
+ config_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button_cfg2"));
+ if (config_btn)
+ g_signal_connect(G_OBJECT(config_btn), "clicked", G_CALLBACK(on_show_event_list_cb), NULL);
}
void create_assistant()
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
index fa9f15ed..bff2c3e0 100644
--- a/src/gui-wizard-gtk/wizard.glade
+++ b/src/gui-wizard-gtk/wizard.glade
@@ -168,15 +168,44 @@
<child>
<placeholder/>
</child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
<child>
- <placeholder/>
+ <object class="GtkButton" id="button_cfg1">
+ <property name="label" translatable="yes">Configure Events</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image_position">right</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="position">1</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -255,15 +284,44 @@
<child>
<placeholder/>
</child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
<child>
- <placeholder/>
+ <object class="GtkButton" id="button_cfg2">
+ <property name="label" translatable="yes">Configure Events</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image_position">right</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="position">1</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
</object>