diff options
Diffstat (limited to 'mate-screenshot')
-rw-r--r-- | mate-screenshot/data/Makefile.am | 6 | ||||
-rw-r--r-- | mate-screenshot/data/mate-screenshot-gtk3.ui | 225 | ||||
-rw-r--r-- | mate-screenshot/src/screenshot-dialog.c | 5 |
3 files changed, 235 insertions, 1 deletions
diff --git a/mate-screenshot/data/Makefile.am b/mate-screenshot/data/Makefile.am index 548b64be..ae781d46 100644 --- a/mate-screenshot/data/Makefile.am +++ b/mate-screenshot/data/Makefile.am @@ -4,9 +4,13 @@ mate_screenshot_DATA = $(mate_screenshot_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ man_MANS = mate-screenshot.1 - +if WITH_GTK3 +uidir = $(datadir)/mate-screenshot +ui_DATA = mate-screenshot-gtk3.ui +else uidir = $(datadir)/mate-screenshot ui_DATA = mate-screenshot.ui +endif @INTLTOOL_XML_RULE@ appdatadir = $(datadir)/appdata diff --git a/mate-screenshot/data/mate-screenshot-gtk3.ui b/mate-screenshot/data/mate-screenshot-gtk3.ui new file mode 100644 index 00000000..7d149221 --- /dev/null +++ b/mate-screenshot/data/mate-screenshot-gtk3.ui @@ -0,0 +1,225 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<!--*- mode: xml -*--> +<interface> + <requires lib="gtk+" version="3.10"/> + <object class="GtkDialog" id="toplevel"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Save Screenshot new-glade</property> + <property name="resizable">False</property> + <property name="type_hint">dialog</property> + <signal name="key-press-event" handler="on_toplevel_key_press_event" swapped="no"/> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="help_button"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="copy_button"> + <property name="label" translatable="yes">C_opy to Clipboard</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <accelerator key="C" signal="activate" modifiers="GDK_CONTROL_MASK"/> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel_button"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="ok_button"> + <property name="label">gtk-save</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="vbox3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="orientation">vertical</property> + <property name="spacing">18</property> + <child> + <object class="GtkBox" id="hbox6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">12</property> + <child> + <object class="GtkAspectFrame" id="aspect_frame"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0</property> + <property name="shadow_type">in</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <child> + <object class="GtkDrawingArea" id="preview_darea"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="table1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Name:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">filename_entry</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Save in _folder:</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="filename_entry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">True</property> + <property name="width_chars">32</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="file_chooser_box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="-11">help_button</action-widget> + <action-widget response="1">copy_button</action-widget> + <action-widget response="-6">cancel_button</action-widget> + <action-widget response="-5">ok_button</action-widget> + </action-widgets> + </object> +</interface> diff --git a/mate-screenshot/src/screenshot-dialog.c b/mate-screenshot/src/screenshot-dialog.c index 7c5fae6d..5f5fd098 100644 --- a/mate-screenshot/src/screenshot-dialog.c +++ b/mate-screenshot/src/screenshot-dialog.c @@ -234,7 +234,12 @@ screenshot_dialog_new (GdkPixbuf *screenshot, dialog = g_new0 (ScreenshotDialog, 1); dialog->ui = gtk_builder_new (); +#if GTK_CHECK_VERSION (3, 0, 0) + res = gtk_builder_add_from_file (dialog->ui, UIDIR "/mate-screenshot-gtk3.ui", &error); +#else res = gtk_builder_add_from_file (dialog->ui, UIDIR "/mate-screenshot.ui", &error); +#endif + dialog->screenshot = screenshot; if (res == 0) |