GtkWidget * reset_item;
GtkWidget * save_as_item;
GtkWidget * open_item;
+ GtkWidget * screenshot_item;
GtkWidget * samples_label;
+
+ gboolean screenshot_window_visible;
+ GtkWidget * screenshot_textview;
+ GtkWidget * screenshot_close_button;
+ GtkWidget * screenshot_window;
Profile * profile;
ProfileDescendant * descendants;
gtk_widget_set_sensitive (GTK_WIDGET (app->descendants_view), sensitive_tree_views);
gtk_widget_set_sensitive (GTK_WIDGET (app->samples_label), sensitive_samples_label);
+ if (app->screenshot_window_visible)
+ gtk_widget_show (app->screenshot_window);
+ else
+ gtk_widget_hide (app->screenshot_window);
+
+ gtk_check_menu_item_set_active (
+ GTK_CHECK_MENU_ITEM (app->screenshot_item), app->screenshot_window_visible);
+
queue_show_samples (app);
}
}
static void
+on_screenshot_activated (GtkCheckMenuItem *menu_item,
+ Application *app)
+{
+ app->screenshot_window_visible = gtk_check_menu_item_get_active (menu_item);
+
+ update_sensitivity (app);
+}
+
+static void
+on_screenshot_window_delete (GtkWidget *window,
+ GdkEvent *event,
+ Application *app)
+{
+ app->screenshot_window_visible = FALSE;
+
+ update_sensitivity (app);
+}
+
+static void
+on_screenshot_close_button_clicked (GtkWidget *widget,
+ Application *app)
+{
+ app->screenshot_window_visible = FALSE;
+
+ update_sensitivity (app);
+}
+
+static void
set_sizes (GtkWindow *window,
GtkWidget *hpaned,
GtkWidget *vpaned)
app->reset_item = glade_xml_get_widget (xml, "reset_item");
app->open_item = glade_xml_get_widget (xml, "open_item");
app->save_as_item = glade_xml_get_widget (xml, "save_as_item");
+ app->screenshot_item = glade_xml_get_widget (xml, "screenshot_item");
g_assert (app->start_item);
g_assert (app->profile_item);
g_signal_connect (G_OBJECT (app->save_as_item), "activate",
G_CALLBACK (on_save_as_clicked), app);
+ g_signal_connect (G_OBJECT (app->screenshot_item), "activate",
+ G_CALLBACK (on_screenshot_activated), app);
+
g_signal_connect (G_OBJECT (glade_xml_get_widget (xml, "quit")), "activate",
G_CALLBACK (on_delete), NULL);
g_signal_connect (app->descendants_view, "row-activated",
G_CALLBACK (on_descendants_row_activated), app);
gtk_tree_view_column_set_expand (col, TRUE);
-
+
gtk_widget_grab_focus (GTK_WIDGET (app->object_view));
+
+ /* Screenshot window */
+ app->screenshot_window = glade_xml_get_widget (xml, "screenshot_window");
+ app->screenshot_textview = glade_xml_get_widget (xml, "screenshot_textview");
+ app->screenshot_close_button = glade_xml_get_widget (xml, "screenshot_close_button");
+
+ g_signal_connect (app->screenshot_window, "delete_event",
+ G_CALLBACK (on_screenshot_window_delete), app);
+
+ g_signal_connect (app->screenshot_close_button, "clicked",
+ G_CALLBACK (on_screenshot_close_button_clicked), app);
+
+ /* hide/show widgets */
gtk_widget_show_all (app->main_window);
gtk_widget_hide (app->dummy_button);
+ gtk_widget_hide (app->screenshot_window);
queue_show_samples (app);
<signal name="activate" handler="on_start1_activate" last_modification_time="Thu, 04 Nov 2004 18:51:54 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image98">
+ <widget class="GtkImage" id="image128">
<property name="visible">True</property>
<property name="stock">gtk-media-play</property>
<property name="icon_size">1</property>
<signal name="activate" handler="on_profile1_activate" last_modification_time="Thu, 04 Nov 2004 18:51:54 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image99">
+ <widget class="GtkImage" id="image129">
<property name="visible">True</property>
<property name="stock">gtk-justify-left</property>
<property name="icon_size">1</property>
<signal name="activate" handler="on_reset_item_activate" last_modification_time="Fri, 05 Nov 2004 15:34:30 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image100">
+ <widget class="GtkImage" id="image130">
<property name="visible">True</property>
<property name="stock">gtk-clear</property>
<property name="icon_size">1</property>
<accelerator key="o" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image101">
+ <widget class="GtkImage" id="image131">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
<accelerator key="s" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image102">
+ <widget class="GtkImage" id="image132">
<property name="visible">True</property>
<property name="stock">gtk-save-as</property>
<property name="icon_size">1</property>
<accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image103">
+ <widget class="GtkImage" id="image133">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
</child>
<child>
+ <widget class="GtkMenuItem" id="view1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_View</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_view1_activate" last_modification_time="Tue, 08 Nov 2005 04:06:22 GMT"/>
+
+ <child>
+ <widget class="GtkMenu" id="view1_menu">
+
+ <child>
+ <widget class="GtkCheckMenuItem" id="screenshot_item">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Screenshot Window</property>
+ <property name="use_underline">True</property>
+ <property name="active">False</property>
+ <signal name="activate" handler="on_screenshot_item_activate" last_modification_time="Tue, 08 Nov 2005 00:40:14 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
<widget class="GtkMenuItem" id="menuitem4">
<property name="visible">True</property>
<property name="label" translatable="yes">_Help</property>
<signal name="activate" handler="on_about_activate" last_modification_time="Wed, 31 Dec 2003 20:44:40 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image104">
+ <widget class="GtkImage" id="image134">
<property name="visible">True</property>
<property name="stock">gtk-about</property>
<property name="icon_size">1</property>
</child>
</widget>
+<widget class="GtkWindow" id="screenshot_window">
+ <property name="title" translatable="yes">Screenshot</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_UTILITY</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox4">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">3</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow4">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="screenshot_textview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="overwrite">False</property>
+ <property name="accepts_tab">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_NONE</property>
+ <property name="cursor_visible">False</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Screenshot</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkButton" id="screenshot_close_button">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>