diff options
author | Stefano Karapetsas <[email protected]> | 2014-01-19 20:01:03 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-01-19 20:01:03 +0100 |
commit | c2ef8063f9353b4e9fa315a35ce47f7bc7fefe53 (patch) | |
tree | a9ecab6e68ce3e4f0135d8c2f959b781dbbaf265 /charpick | |
parent | 83e7a0b1bd79765e8126ab81c19ccc62a07588b6 (diff) | |
download | mate-applets-c2ef8063f9353b4e9fa315a35ce47f7bc7fefe53.tar.bz2 mate-applets-c2ef8063f9353b4e9fa315a35ce47f7bc7fefe53.tar.xz |
charpick: Add GTK3 support
Diffstat (limited to 'charpick')
-rw-r--r-- | charpick/charpick.c | 12 | ||||
-rw-r--r-- | charpick/properties.c | 5 |
2 files changed, 13 insertions, 4 deletions
diff --git a/charpick/charpick.c b/charpick/charpick.c index 6f5e766e..88f1bc83 100644 --- a/charpick/charpick.c +++ b/charpick/charpick.c @@ -11,6 +11,10 @@ #endif #include "charpick.h" +#if GTK_CHECK_VERSION (3, 0, 0) +#define GTK_OBJECT(x) G_OBJECT(x) +#endif + /* The comment for each char list has the html entity names of the chars */ /* All gunicar codes should end in 0 */ @@ -325,8 +329,12 @@ get_menu_pos (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data) gtk_widget_size_request (GTK_WIDGET (menu), &reqmenu); gdk_window_get_origin (GDK_WINDOW (gtk_widget_get_window(curr_data->applet)), &tempx, &tempy); - gdk_window_get_geometry (GDK_WINDOW (gtk_widget_get_window(curr_data->applet)), NULL, NULL, - &width, &height, NULL); + gdk_window_get_geometry (GDK_WINDOW (gtk_widget_get_window(curr_data->applet)), NULL, NULL, + &width, &height +#if !GTK_CHECK_VERSION (3, 0, 0) + , NULL +#endif + ); switch (mate_panel_applet_get_orient (MATE_PANEL_APPLET (curr_data->applet))) { case MATE_PANEL_APPLET_ORIENT_DOWN: diff --git a/charpick/properties.c b/charpick/properties.c index 5ff2b68e..80bea55c 100644 --- a/charpick/properties.c +++ b/charpick/properties.c @@ -92,8 +92,7 @@ add_edit_dialog_create (charpick_data *curr_data, gchar *string, gchar *title) GtkWidget *label; dialog = gtk_dialog_new_with_buttons (_(title), GTK_WINDOW (curr_data->propwindow), - GTK_DIALOG_DESTROY_WITH_PARENT | - GTK_DIALOG_NO_SEPARATOR, + GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); @@ -550,7 +549,9 @@ show_preferences_dialog (GtkAction *action, gtk_container_set_border_width (GTK_CONTAINER (curr_data->propwindow), 5); gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG (curr_data->propwindow))), 2); gtk_dialog_set_default_response (GTK_DIALOG (curr_data->propwindow), GTK_RESPONSE_CLOSE); +#if !GTK_CHECK_VERSION (3, 0, 0) gtk_dialog_set_has_separator (GTK_DIALOG (curr_data->propwindow), FALSE); +#endif default_chars_frame_create(curr_data); g_signal_connect (G_OBJECT (curr_data->propwindow), "response", |