diff options
author | monsta <[email protected]> | 2018-01-28 20:16:44 +0300 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-01-30 09:09:33 +0100 |
commit | bc42c561e29041c168b806a5618580066aa8a222 (patch) | |
tree | d5889961598cb89dc7231b4fbbdc0266c01bc1c0 /src/themes | |
parent | 4a4687f22d854e5d4736830f513c577439e42151 (diff) | |
download | mate-notification-daemon-bc42c561e29041c168b806a5618580066aa8a222.tar.bz2 mate-notification-daemon-bc42c561e29041c168b806a5618580066aa8a222.tar.xz |
require GTK+ 3.22 and GLib 2.50
and drop additional checks for min/max GLib versions, it's not needed
Diffstat (limited to 'src/themes')
-rw-r--r-- | src/themes/coco/coco-theme.c | 12 | ||||
-rw-r--r-- | src/themes/nodoka/nodoka-theme.c | 12 | ||||
-rw-r--r-- | src/themes/slider/theme.c | 12 | ||||
-rw-r--r-- | src/themes/standard/theme.c | 30 |
4 files changed, 0 insertions, 66 deletions
diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c index 52d542c..2401e6c 100644 --- a/src/themes/coco/coco-theme.c +++ b/src/themes/coco/coco-theme.c @@ -453,12 +453,8 @@ create_notification(UrlClickedCb url_clicked) windata->summary_label = gtk_label_new(NULL); gtk_widget_show(windata->summary_label); gtk_box_pack_start(GTK_BOX(vbox), windata->summary_label, FALSE, FALSE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (windata->summary_label), 0.0); gtk_label_set_yalign (GTK_LABEL (windata->summary_label), 0.0); -#else - gtk_misc_set_alignment(GTK_MISC(windata->summary_label), 0.0, 0.0); -#endif gtk_label_set_line_wrap(GTK_LABEL(windata->summary_label), TRUE); gtk_label_set_line_wrap_mode (GTK_LABEL (windata->summary_label), PANGO_WRAP_WORD_CHAR); @@ -467,12 +463,8 @@ create_notification(UrlClickedCb url_clicked) windata->body_label = gtk_label_new(NULL); gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, FALSE, FALSE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (windata->body_label), 0.0); gtk_label_set_yalign (GTK_LABEL (windata->body_label), 0.0); -#else - gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0.0, 0.0); -#endif gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE); gtk_label_set_line_wrap_mode (GTK_LABEL (windata->body_label), PANGO_WRAP_WORD_CHAR); gtk_label_set_max_width_chars (GTK_LABEL (windata->body_label), 50); @@ -623,12 +615,8 @@ add_notification_action(GtkWindow *nw, const char *text, const char *key, label = gtk_label_new(NULL); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (label), 0.0); gtk_label_set_yalign (GTK_LABEL (label), 0.5); -#else - gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); -#endif buf = g_strdup_printf("<small>%s</small>", text); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); diff --git a/src/themes/nodoka/nodoka-theme.c b/src/themes/nodoka/nodoka-theme.c index 4d3a2a1..6348cd6 100644 --- a/src/themes/nodoka/nodoka-theme.c +++ b/src/themes/nodoka/nodoka-theme.c @@ -800,12 +800,8 @@ create_notification(UrlClickedCb url_clicked) windata->summary_label = gtk_label_new(NULL); gtk_widget_show(windata->summary_label); gtk_box_pack_start(GTK_BOX(hbox), windata->summary_label, TRUE, TRUE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (windata->summary_label), 0.0); gtk_label_set_yalign (GTK_LABEL (windata->summary_label), 0.0); -#else - gtk_misc_set_alignment(GTK_MISC(windata->summary_label), 0.0, 0.0); -#endif gtk_label_set_line_wrap(GTK_LABEL(windata->summary_label), TRUE); gtk_label_set_line_wrap_mode (GTK_LABEL (windata->summary_label), PANGO_WRAP_WORD_CHAR); @@ -853,12 +849,8 @@ create_notification(UrlClickedCb url_clicked) windata->body_label = gtk_label_new(NULL); gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, TRUE, TRUE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (windata->body_label), 0.0); gtk_label_set_yalign (GTK_LABEL (windata->body_label), 0.0); -#else - gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0.0, 0.0); -#endif gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE); gtk_label_set_line_wrap_mode (GTK_LABEL (windata->body_label), PANGO_WRAP_WORD_CHAR); gtk_label_set_max_width_chars (GTK_LABEL (windata->body_label), 50); @@ -1021,12 +1013,8 @@ add_notification_action(GtkWindow *nw, const char *text, const char *key, label = gtk_label_new(NULL); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (label), 0.0); gtk_label_set_yalign (GTK_LABEL (label), 0.5); -#else - gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); -#endif buf = g_strdup_printf("<small>%s</small>", text); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); diff --git a/src/themes/slider/theme.c b/src/themes/slider/theme.c index d7d4823..d1a2826 100644 --- a/src/themes/slider/theme.c +++ b/src/themes/slider/theme.c @@ -405,12 +405,8 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) windata->summary_label = gtk_label_new(NULL); gtk_widget_show(windata->summary_label); gtk_box_pack_start(GTK_BOX(vbox), windata->summary_label, TRUE, TRUE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (windata->summary_label), 0.0); gtk_label_set_yalign (GTK_LABEL (windata->summary_label), 0.0); -#else - gtk_misc_set_alignment(GTK_MISC(windata->summary_label), 0.0, 0.0); -#endif gtk_label_set_line_wrap(GTK_LABEL(windata->summary_label), TRUE); gtk_label_set_line_wrap_mode (GTK_LABEL (windata->summary_label), PANGO_WRAP_WORD_CHAR); @@ -428,12 +424,8 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) windata->body_label = gtk_label_new(NULL); gtk_widget_show(windata->body_label); gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, TRUE, TRUE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (windata->body_label), 0.0); gtk_label_set_yalign (GTK_LABEL (windata->body_label), 0.0); -#else - gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0.0, 0.0); -#endif gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE); gtk_label_set_line_wrap_mode (GTK_LABEL (windata->body_label), PANGO_WRAP_WORD_CHAR); gtk_label_set_max_width_chars (GTK_LABEL (windata->body_label), 50); @@ -763,12 +755,8 @@ void add_notification_action(GtkWindow* nw, const char* text, const char* key, A label = gtk_label_new(NULL); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (label), 0.0); gtk_label_set_yalign (GTK_LABEL (label), 0.5); -#else - gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); -#endif buf = g_strdup_printf("<small>%s</small>", text); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); diff --git a/src/themes/standard/theme.c b/src/themes/standard/theme.c index 3366736..0048f01 100644 --- a/src/themes/standard/theme.c +++ b/src/themes/standard/theme.c @@ -266,24 +266,15 @@ static GtkArrowType get_notification_arrow_type(GtkWidget* nw) WindowData* windata; GdkScreen* screen; GdkRectangle monitor_geometry; -#if GTK_CHECK_VERSION (3, 22, 0) GdkDisplay* display; GdkMonitor* monitor; -#else - int monitor; -#endif windata = g_object_get_data(G_OBJECT(nw), "windata"); screen = gdk_window_get_screen(GDK_WINDOW( gtk_widget_get_window(nw))); -#if GTK_CHECK_VERSION (3, 22, 0) display = gdk_screen_get_display (screen); monitor = gdk_display_get_monitor_at_point (display, windata->point_x, windata->point_y); gdk_monitor_get_geometry (monitor, &monitor_geometry); -#else - monitor = gdk_screen_get_monitor_at_point(screen, windata->point_x, windata->point_y); - gdk_screen_get_monitor_geometry(screen, monitor, &monitor_geometry); -#endif if (windata->point_y - monitor_geometry.y + windata->height + DEFAULT_ARROW_HEIGHT > monitor_geometry.height) { @@ -318,26 +309,17 @@ static void create_border_with_arrow(GtkWidget* nw, WindowData* windata) int arrow_offset = DEFAULT_ARROW_OFFSET; GdkPoint* shape_points = NULL; int i = 0; -#if GTK_CHECK_VERSION (3, 22, 0) GdkMonitor* monitor; GdkDisplay* display; -#else - int monitor; -#endif GdkRectangle monitor_geometry; width = windata->width; height = windata->height; screen = gdk_window_get_screen(GDK_WINDOW(gtk_widget_get_window(nw))); -#if GTK_CHECK_VERSION (3, 22, 0) display = gdk_screen_get_display (screen); monitor = gdk_display_get_monitor_at_point (display, windata->point_x, windata->point_y); gdk_monitor_get_geometry (monitor, &monitor_geometry); -#else - monitor = gdk_screen_get_monitor_at_point(screen, windata->point_x, windata->point_y); - gdk_screen_get_monitor_geometry(screen, monitor, &monitor_geometry); -#endif windata->num_border_points = 5; @@ -743,12 +725,8 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) windata->summary_label = gtk_label_new(NULL); gtk_widget_show(windata->summary_label); gtk_box_pack_start(GTK_BOX(hbox), windata->summary_label, TRUE, TRUE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (windata->summary_label), 0.0); gtk_label_set_yalign (GTK_LABEL (windata->summary_label), 0.0); -#else - gtk_misc_set_alignment(GTK_MISC(windata->summary_label), 0.0, 0.0); -#endif gtk_label_set_line_wrap(GTK_LABEL(windata->summary_label), TRUE); gtk_label_set_line_wrap_mode (GTK_LABEL (windata->summary_label), PANGO_WRAP_WORD_CHAR); @@ -797,12 +775,8 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) windata->body_label = gtk_label_new(NULL); gtk_widget_show(windata->body_label); gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, TRUE, TRUE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (windata->body_label), 0.0); gtk_label_set_yalign (GTK_LABEL (windata->body_label), 0.0); -#else - gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0.0, 0.0); -#endif gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE); gtk_label_set_line_wrap_mode (GTK_LABEL (windata->body_label), PANGO_WRAP_WORD_CHAR); gtk_label_set_max_width_chars (GTK_LABEL (windata->body_label), 50); @@ -1086,12 +1060,8 @@ void add_notification_action(GtkWindow* nw, const char* text, const char* key, A label = gtk_label_new(NULL); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); -#if GTK_CHECK_VERSION (3, 16, 0) gtk_label_set_xalign (GTK_LABEL (label), 0.0); gtk_label_set_yalign (GTK_LABEL (label), 0.5); -#else - gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); -#endif buf = g_strdup_printf("<small>%s</small>", text); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); |