diff options
Diffstat (limited to 'stickynotes')
-rw-r--r-- | stickynotes/stickynotes_applet.c | 4 | ||||
-rw-r--r-- | stickynotes/stickynotes_applet_callbacks.c | 49 | ||||
-rw-r--r-- | stickynotes/stickynotes_applet_callbacks.h | 9 |
3 files changed, 2 insertions, 60 deletions
diff --git a/stickynotes/stickynotes_applet.c b/stickynotes/stickynotes_applet.c index ed5563ae..eb50f36d 100644 --- a/stickynotes/stickynotes_applet.c +++ b/stickynotes/stickynotes_applet.c @@ -404,11 +404,11 @@ StickyNotesApplet * stickynotes_applet_new(MatePanelApplet *mate_panel_applet) G_CALLBACK(applet_size_allocate_cb), applet); g_signal_connect(G_OBJECT(applet->w_applet), "change-orient", G_CALLBACK(applet_change_orient_cb), applet); - g_signal_connect(G_OBJECT(applet->w_applet), "change_background", - G_CALLBACK(applet_change_bg_cb), applet); g_signal_connect(G_OBJECT(applet->w_applet), "destroy", G_CALLBACK(applet_destroy_cb), applet); + mate_panel_applet_set_background_widget (mate_panel_applet, applet->w_applet); + atk_obj = gtk_widget_get_accessible (applet->w_applet); atk_object_set_name (atk_obj, _("Sticky Notes")); diff --git a/stickynotes/stickynotes_applet_callbacks.c b/stickynotes/stickynotes_applet_callbacks.c index 6414db5c..2da02a32 100644 --- a/stickynotes/stickynotes_applet_callbacks.c +++ b/stickynotes/stickynotes_applet_callbacks.c @@ -228,55 +228,6 @@ void applet_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation, Stick return; } -/* Applet Callback : Change the applet background. */ -void -applet_change_bg_cb (MatePanelApplet *mate_panel_applet, - MatePanelAppletBackgroundType type, - GdkColor *color, -#if GTK_CHECK_VERSION (3, 0, 0) - cairo_pattern_t *pattern, -#else - GdkPixmap *pixmap, -#endif - StickyNotesApplet *applet) -{ -#if !GTK_CHECK_VERSION (3, 0, 0) - /* Taken from TrashApplet */ - GtkRcStyle *rc_style; - GtkStyle *style; - - if (!applet) g_print ("arrg, no applet!\n"); - - /* reset style */ - gtk_widget_set_style (GTK_WIDGET (applet->w_applet), NULL); - rc_style = gtk_rc_style_new (); - gtk_widget_modify_style (GTK_WIDGET (applet->w_applet), rc_style); - g_object_unref (rc_style); - - switch (type) - { - case PANEL_NO_BACKGROUND: - break; - case PANEL_COLOR_BACKGROUND: - gtk_widget_modify_bg (GTK_WIDGET (applet->w_applet), - GTK_STATE_NORMAL, color); - break; - case PANEL_PIXMAP_BACKGROUND: - style = gtk_style_copy ( - gtk_widget_get_style (GTK_WIDGET (applet->w_applet))); - if (style->bg_pixmap[GTK_STATE_NORMAL]) - g_object_unref ( - style->bg_pixmap[GTK_STATE_NORMAL]); - style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref ( - pixmap); - gtk_widget_set_style ( - GTK_WIDGET (applet->w_applet), style); - g_object_unref (style); - break; - } -#endif -} - /* Applet Callback : Deletes the applet. */ void applet_destroy_cb (MatePanelApplet *mate_panel_applet, StickyNotesApplet *applet) { diff --git a/stickynotes/stickynotes_applet_callbacks.h b/stickynotes/stickynotes_applet_callbacks.h index c743bb44..7cee63da 100644 --- a/stickynotes/stickynotes_applet_callbacks.h +++ b/stickynotes/stickynotes_applet_callbacks.h @@ -30,15 +30,6 @@ gboolean applet_focus_cb(GtkWidget *widget, GdkEventFocus *event, StickyNotesApp void install_check_click_on_desktop (void); void applet_change_orient_cb(MatePanelApplet *mate_panel_applet, MatePanelAppletOrient orient, StickyNotesApplet *applet); void applet_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation, StickyNotesApplet *applet); -void applet_change_bg_cb (MatePanelApplet *mate_panel_applet, - MatePanelAppletBackgroundType type, - GdkColor *color, -#if GTK_CHECK_VERSION (3, 0, 0) - cairo_pattern_t *pattern, -#else - GdkPixmap *pixmap, -#endif - StickyNotesApplet *applet); void applet_destroy_cb (MatePanelApplet *mate_panel_applet, StickyNotesApplet *applet); /* Callbacks for sticky notes applet menu */ void menu_create_cb(GtkAction *action, StickyNotesApplet *applet); |