summaryrefslogtreecommitdiff
path: root/plugins/shellexecui
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-04-24 14:24:04 +0200
committerGravatar waker <wakeroid@gmail.com>2012-04-24 14:24:04 +0200
commit15bd1af9f7c6bdad62b9610b1303b281f252b367 (patch)
tree834dabe3420d74e4f1fd86149b2bf1a7126ecc5a /plugins/shellexecui
parentd965ed0361823f42f46bc9d039daedd8b7e4fb9d (diff)
fixed shellexecui gtk3 compat
Diffstat (limited to 'plugins/shellexecui')
-rw-r--r--plugins/shellexecui/interface.c3
-rw-r--r--plugins/shellexecui/shellexec.glade500
-rw-r--r--plugins/shellexecui/shellexec.gladep12
-rw-r--r--plugins/shellexecui/shellexecui.c7
-rw-r--r--plugins/shellexecui/support.c77
-rw-r--r--plugins/shellexecui/support.h83
6 files changed, 675 insertions, 7 deletions
diff --git a/plugins/shellexecui/interface.c b/plugins/shellexecui/interface.c
index fe13ced8..c5795b0e 100644
--- a/plugins/shellexecui/interface.c
+++ b/plugins/shellexecui/interface.c
@@ -48,7 +48,6 @@ create_shellexec_conf_dialog (void)
dialog_vbox = gtk_dialog_get_content_area (GTK_DIALOG (shellexec_conf_dialog));
gtk_widget_show (dialog_vbox);
- gtk_box_set_spacing(GTK_BOX(dialog_vbox), 8);
hbox1 = gtk_hbox_new (FALSE, 8);
gtk_widget_show (hbox1);
@@ -75,7 +74,6 @@ create_shellexec_conf_dialog (void)
command_treeview = gtk_tree_view_new ();
gtk_widget_show (command_treeview);
gtk_container_add (GTK_CONTAINER (scrolledwindow), command_treeview);
- gtk_widget_set_size_request (command_treeview, 300, 200);
dialog_action_area = gtk_dialog_get_action_area (GTK_DIALOG (shellexec_conf_dialog));
gtk_widget_show (dialog_action_area);
@@ -145,7 +143,6 @@ create_shellexec_conf_edit_dialog (void)
dialog_vbox1 = gtk_dialog_get_content_area (GTK_DIALOG (shellexec_conf_edit_dialog));
gtk_widget_show (dialog_vbox1);
- gtk_box_set_spacing(GTK_BOX(dialog_vbox1), 8);
table1 = gtk_table_new (3, 2, FALSE);
gtk_widget_show (table1);
diff --git a/plugins/shellexecui/shellexec.glade b/plugins/shellexecui/shellexec.glade
new file mode 100644
index 00000000..69425367
--- /dev/null
+++ b/plugins/shellexecui/shellexec.glade
@@ -0,0 +1,500 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="shellexec_conf_dialog">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Custom Shell Commands</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_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">False</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">8</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="save_button">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Close</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="on_save_button_clicked" last_modification_time="Sat, 28 Jan 2012 03:21:29 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">8</property>
+
+ <child>
+ <widget class="GtkButton" id="add_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Add</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_add_button_clicked" last_modification_time="Sat, 28 Jan 2012 11:02:39 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="remove_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Remove</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_remove_button_clicked" last_modification_time="Sat, 28 Jan 2012 11:02:47 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="edit_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Edit</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_edit_button_clicked" last_modification_time="Sat, 31 Mar 2012 22:29:32 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow">
+ <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_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="command_treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="shellexec_conf_edit_dialog">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Edit Command</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">True</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_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">False</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">8</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="edit_cancel_button">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ <signal name="clicked" handler="on_edit_cancel_button_clicked" last_modification_time="Sun, 01 Apr 2012 05:14:42 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="edit_ok_button">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ <signal name="clicked" handler="on_edit_ok_button_clicked" last_modification_time="Sun, 01 Apr 2012 07:44:07 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">8</property>
+ <property name="column_spacing">8</property>
+
+ <child>
+ <widget class="GtkLabel" id="title_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Title:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="cmd_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Shell Command:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">•</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="cmd_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">•</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="name_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Name:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="title_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">•</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="single_check">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Single Tracks</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="multiple_check">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Multiple Tracks</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="local_check">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Local</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="remote_check">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Remote</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="playlist_check">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Playlist</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="disabled_check">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Disabled</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/plugins/shellexecui/shellexec.gladep b/plugins/shellexecui/shellexec.gladep
new file mode 100644
index 00000000..3daaaba7
--- /dev/null
+++ b/plugins/shellexecui/shellexec.gladep
@@ -0,0 +1,12 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+ <name>Shellexecui</name>
+ <program_name>shellexecui</program_name>
+ <source_directory></source_directory>
+ <gnome_support>FALSE</gnome_support>
+ <output_main_file>FALSE</output_main_file>
+ <output_support_files>FALSE</output_support_files>
+ <output_build_files>FALSE</output_build_files>
+</glade-project>
diff --git a/plugins/shellexecui/shellexecui.c b/plugins/shellexecui/shellexecui.c
index ed1c6504..a767e4f7 100644
--- a/plugins/shellexecui/shellexecui.c
+++ b/plugins/shellexecui/shellexecui.c
@@ -369,6 +369,7 @@ static int
shellexecui_action_callback(DB_plugin_action_t *action,
void *user_data) {
conf_dlg = create_shellexec_conf_dialog();
+ gtk_widget_set_size_request (conf_dlg, 400, 400);
dirty = 0;
gtk_window_set_transient_for(GTK_WINDOW(conf_dlg),
GTK_WINDOW(gtkui_plugin->get_mainwin()));
@@ -414,7 +415,11 @@ static DB_misc_t plugin = {
.plugin.api_vminor = 0,
.plugin.version_major = 1,
.plugin.version_minor = 0,
- .plugin.id = "shellexecui",
+#if GTK_CHECK_VERSION(3,0,0)
+ .plugin.id = "shellexec_gtk2",
+#else
+ .plugin.id = "shellexec_gtk3",
+#endif
.plugin.name = "Shellexec GTK UI",
.plugin.descr = "A GTK UI for the Shellexec plugin",
.plugin.copyright =
diff --git a/plugins/shellexecui/support.c b/plugins/shellexecui/support.c
index 7965ef51..1eef6efc 100644
--- a/plugins/shellexecui/support.c
+++ b/plugins/shellexecui/support.c
@@ -142,3 +142,80 @@ glade_set_atk_action_description (AtkAction *action,
}
}
+#if GTK_CHECK_VERSION(3,0,0)
+GtkWidget *
+gtk_combo_box_entry_new_text(void) {
+ GtkWidget *w = gtk_combo_box_text_new_with_entry ();
+}
+
+void
+gtk_dialog_set_has_separator (GtkDialog *dlg, gboolean has) {
+}
+#endif
+
+#if !GTK_CHECK_VERSION(2,22,0)
+GdkDragAction
+gdk_drag_context_get_selected_action (GdkDragContext *context) {
+ return context->action;
+}
+GList *
+gdk_drag_context_list_targets (GdkDragContext *context) {
+ return context->targets;
+}
+#endif
+
+#if !GTK_CHECK_VERSION(2,24,0)
+#define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
+GtkWidget *
+gtk_combo_box_text_new () {
+ return gtk_combo_box_new_text ();
+}
+
+GtkWidget *
+gtk_combo_box_text_new_with_entry (void) {
+ return gtk_combo_box_entry_new ();
+}
+
+void
+gtk_combo_box_text_append_text (GtkComboBoxText *combo_box, const gchar *text) {
+ gtk_combo_box_append_text (combo_box, text);
+}
+
+void
+gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box, gint position, const gchar *text) {
+ gtk_combo_box_insert_text (combo_box, position, text);
+}
+
+void
+gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box, const gchar *text) {
+ gtk_combo_box_prepend_text (combo_box, text);
+}
+gchar *
+gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box) {
+ return gtk_combo_box_get_active_text (combo_box);
+}
+
+#endif
+
+#if !GTK_CHECK_VERSION(2,18,0) || defined(ULTRA_COMPATIBLE)
+void
+gtk_widget_set_allocation (GtkWidget *widget, const GtkAllocation *allocation) {
+ widget->allocation.x = (allocation)->x;
+ widget->allocation.y = (allocation)->y;
+ widget->allocation.width = (allocation)->width;
+ widget->allocation.height = (allocation)->height;
+}
+
+void
+gtk_widget_get_allocation (GtkWidget *widget, GtkAllocation *allocation) {
+ (allocation)->x = widget->allocation.x;
+ (allocation)->y = widget->allocation.y;
+ (allocation)->width = widget->allocation.width;
+ (allocation)->height = widget->allocation.height;
+}
+
+void
+gtk_widget_set_window(GtkWidget *widget, GdkWindow *window) {
+ widget->window = window;
+}
+#endif
diff --git a/plugins/shellexecui/support.h b/plugins/shellexecui/support.h
index a32649e5..064cd5bc 100644
--- a/plugins/shellexecui/support.h
+++ b/plugins/shellexecui/support.h
@@ -1,12 +1,16 @@
-/*
- * DO NOT EDIT THIS FILE - it is generated by Glade.
- */
+#ifndef __SUPPORT_H
+#define __SUPPORT_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
+#if GTK_CHECK_VERSION(3,0,0)
+#include <gdk/gdkkeysyms-compat.h>
+#else
+#include <gdk/gdkkeysyms.h>
+#endif
/*
* Standard gettext macros.
@@ -27,7 +31,9 @@
# define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain)
+#ifndef _
# define _(String) (String)
+#endif
# define Q_(String) g_strip_context ((String), (String))
# define N_(String) (String)
#endif
@@ -67,3 +73,74 @@ void glade_set_atk_action_description (AtkAction *action,
const gchar *action_name,
const gchar *description);
+#if GTK_CHECK_VERSION(3,0,0)
+GtkWidget *
+gtk_combo_box_entry_new_text(void);
+
+void
+gtk_dialog_set_has_separator (GtkDialog *dlg, gboolean has);
+#endif
+
+#if !GTK_CHECK_VERSION(2,20,0)
+#define gtk_widget_set_realized(widget, realized) {if (realized) GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); else GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED);}
+#define gtk_widget_get_realized(widget) (GTK_WIDGET_REALIZED (widget))
+#endif
+
+#if !GTK_CHECK_VERSION(2,22,0)
+GdkDragAction
+gdk_drag_context_get_selected_action (GdkDragContext *context);
+GList *
+gdk_drag_context_list_targets (GdkDragContext *context);
+#endif
+
+#if !GTK_CHECK_VERSION(2,24,0)
+#define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
+typedef GtkComboBox GtkComboBoxText;
+GtkWidget *gtk_combo_box_text_new ();
+GtkWidget *gtk_combo_box_text_new_with_entry (void);
+void gtk_combo_box_text_append_text (GtkComboBoxText *combo_box, const gchar *text);
+void gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box, gint position, const gchar *text);
+void gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box, const gchar *text);
+gchar *gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box);
+#endif
+
+#if !GTK_CHECK_VERSION(2,14,0) || defined(ULTRA_COMPATIBLE)
+#define gtk_widget_get_window(widget) ((widget)->window)
+#define gtk_selection_data_get_target(data) (data->target)
+#define gtk_dialog_get_content_area(dialog) (dialog->vbox)
+#define gtk_dialog_get_action_area(dialog) (dialog->action_area)
+#define gtk_selection_data_get_data(data) (data->data)
+#define gtk_selection_data_get_length(data) (data->length)
+#define gtk_selection_data_get_format(data) (data->format)
+#define gtk_adjustment_get_lower(adj) (adj->lower)
+#define gtk_adjustment_get_upper(adj) (adj->upper)
+#endif
+
+#if !GTK_CHECK_VERSION(2,18,0) || defined(ULTRA_COMPATIBLE)
+#define gtk_widget_set_has_window(widget, has_window) \
+ if (has_window) GTK_WIDGET_UNSET_FLAGS (widget, GTK_NO_WINDOW); \
+ else GTK_WIDGET_SET_FLAGS (widget, GTK_NO_WINDOW);
+
+#define gtk_widget_get_visible(widget) (GTK_WIDGET_VISIBLE(widget))
+#define gtk_widget_get_has_window(widget) (!GTK_WIDGET_NO_WINDOW(widget))
+void gtk_widget_set_window(GtkWidget *widget, GdkWindow *window);
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,18,0) || defined(ULTRA_COMPATIBLE)
+void gtk_widget_set_allocation (GtkWidget *widget,
+ const GtkAllocation *allocation);
+
+void gtk_widget_get_allocation (GtkWidget *widget,
+ GtkAllocation *allocation);
+
+#define gtk_widget_set_can_focus(widget, canfocus) {if (canfocus) GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS); else GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_FOCUS);}
+
+#define gtk_widget_get_can_focus(widget) (GTK_WIDGET_CAN_FOCUS (widget));
+
+#define gtk_widget_set_can_default(widget, candefault) {if (candefault) GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); else GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_DEFAULT);}
+
+#define gtk_widget_get_can_default(widget) (GTK_WIDGET_CAN_DEFAULT (widget));
+#endif
+
+#endif