--- a/src/gf_display.c Mon Apr 12 18:23:57 2021 -0500
+++ b/src/gf_display.c Mon Apr 12 18:29:56 2021 -0500
@@ -91,9 +91,7 @@
static gboolean vertical, animate;
static GfDisplayPosition position;
-#if GTK_CHECK_VERSION(2,2,0)
static gint disp_screen = 0, disp_monitor = 0;
-#endif /* GTK_CHECK_VERSION(2,2,0) */
/*******************************************************************************
@@ -148,58 +146,9 @@
/*******************************************************************************
- * This is the default behavior of 2.0 and 1.x
- ******************************************************************************/
-#if !GTK_CHECK_VERSION(2,2,0)
-gf_display_get_geometry(gint *x, gint *y, gint *width, gint *height) {
- *width = gdk_screen_width();
- *height = gdk_screen_height();
-gf_display_shape(GfDisplay *display) {
- if(display->has_alpha) {
- GdkBitmap *bitmap = NULL;
- if(display->state == GF_DISPLAY_STATE_SHOWING ||
- display->state == GF_DISPLAY_STATE_HIDING)
- pixbuf = gtk_image_get_pixbuf(GTK_IMAGE(display->image));
- /* image has no pixbuf.. so we have no business continuing */
- pixbuf = display->pixbuf;
- gdk_pixbuf_render_pixmap_and_mask(pixbuf, NULL, &bitmap, 255);
- gtk_widget_shape_combine_mask(display->window, bitmap, 0, 0);
- g_object_unref(G_OBJECT(bitmap));
-gf_display_move(GfDisplay *display) {
- gtk_window_move(GTK_WINDOW(display->window), display->x, display->y);
-#else /* !GTK_CHECK_VERSION(2,2,0) */
-/*******************************************************************************
- * Gtk 2.2.0 and up stuff
* Allows users to specify which screen to display the notifications on and
* in the case of xinerama, to position it correctly
******************************************************************************/
gf_display_get_geometry(gint *x, gint *y, gint *width, gint *height) {
@@ -317,8 +266,6 @@
-#endif /* GTK_CHECK_VERSION(2,2,0) */
/*******************************************************************************
******************************************************************************/
@@ -981,7 +928,6 @@
/*******************************************************************************
* Pref callbacks for the display/screen/monitor stuff
******************************************************************************/
-#if GTK_CHECK_VERSION(2,2,0)
gf_display_screen_changed_cb(const gchar *name, PurplePrefType type,
gconstpointer val, gpointer data)
@@ -1001,7 +947,6 @@
static guint scr_chg_id = 0, mon_chg_id = 0;
-#endif /* GTK_CHECK_VERSION(2,2,0) */
/*******************************************************************************
@@ -1031,7 +976,6 @@
gf_display_animate_changed_cb,
-#if GTK_CHECK_VERSION(2,2,0)
/* setup our multi screen prefs */
disp_screen = purple_prefs_get_int(GF_PREF_ADVANCED_SCREEN);
disp_monitor = purple_prefs_get_int(GF_PREF_ADVANCED_MONITOR);
@@ -1044,17 +988,14 @@
GF_PREF_ADVANCED_MONITOR,
gf_display_monitor_changed_cb,
-#endif /* GTK_CHECK_VERSION(2,2,0) */
purple_prefs_disconnect_callback(pos_chg_id);
purple_prefs_disconnect_callback(ver_chg_id);
-#if GTK_CHECK_VERSION(2,2,0)
purple_prefs_disconnect_callback(scr_chg_id);
purple_prefs_disconnect_callback(mon_chg_id);
-#endif /* GTK_CHECK_VERSION(2,2,0) */
--- a/src/gf_display.h Mon Apr 12 18:23:57 2021 -0500
+++ b/src/gf_display.h Mon Apr 12 18:29:56 2021 -0500
@@ -62,12 +62,10 @@
void gf_display_init(PurplePlugin *plugin);
void gf_display_uninit();
-#if GTK_CHECK_VERSION(2,2,0)
gint gf_display_get_default_screen();
gint gf_display_get_screen_count();
gint gf_display_get_default_monitor();
gint gf_display_get_monitor_count();
-#endif /* GTK_CHECK_VERSION(2,2,0) */
gboolean gf_display_screen_saver_is_running();
--- a/src/gf_item_text.c Mon Apr 12 18:23:57 2021 -0500
+++ b/src/gf_item_text.c Mon Apr 12 18:29:56 2021 -0500
@@ -88,21 +88,17 @@
gdouble xdpi = 75, ydpi = 75;
-# if GTK_CHECK_VERSION(2,2,0)
map = pango_ft2_font_map_new();
-# if GTK_CHECK_VERSION(2,2,0)
display = gdk_display_get_default();
screen = gdk_display_get_screen(display, purple_prefs_get_int(GF_PREF_ADVANCED_SCREEN));
xdpi = (double)((float)gdk_screen_get_width(screen) / (float)gdk_screen_get_width_mm(screen) * 25.4);
ydpi = (double)((float)gdk_screen_get_height(screen) / (float)gdk_screen_get_height_mm(screen) * 25.4);
pango_ft2_font_map_set_resolution(PANGO_FT2_FONT_MAP(map), xdpi, ydpi);
--- a/src/gf_preferences.c Mon Apr 12 18:23:57 2021 -0500
+++ b/src/gf_preferences.c Mon Apr 12 18:29:56 2021 -0500
@@ -1260,9 +1260,7 @@
make_advanced_page(GtkWidget *notebook) {
-#if GTK_CHECK_VERSION(2,2,0)
gint screen_count, monitor_count;
sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
@@ -1273,7 +1271,7 @@
pidgin_prefs_labeled_spin_button(frame, _("Max _Visible Guifications:"),
GF_PREF_BEHAVIOR_THROTTLE,
-#if GTK_CHECK_VERSION(2,2,0)
screen_count = gf_display_get_screen_count();
monitor_count = gf_display_get_monitor_count();
if(screen_count > 0 || monitor_count > 0) {
@@ -1293,7 +1291,6 @@
-#endif /* GTK_CHECK_VERSION(2,2,0) */
gtk_widget_show_all(vbox);
@@ -1367,7 +1364,6 @@
purple_prefs_add_bool(GF_PREF_ADVANCED_RELEASE_NOTIFICATION, TRUE);
purple_prefs_add_int(GF_PREF_ADVANCED_RELEASE_LAST_CHECK, 0);
-#if GTK_CHECK_VERSION(2,2,0)
purple_prefs_add_int(GF_PREF_ADVANCED_SCREEN, 0);
purple_prefs_add_int(GF_PREF_ADVANCED_MONITOR, 0);
@@ -1384,7 +1380,6 @@
purple_prefs_set_int(GF_PREF_ADVANCED_MONITOR,
gf_display_get_default_monitor());
-#endif /* GTK_CHECK_VERSION(2,2,0) */
/* clean up old prefs if they exist */
purple_prefs_remove("/plugins/gtk/amc_grim/guifications2/behavior/show_during_screen_saver");
--- a/src/gf_preferences.h Mon Apr 12 18:23:57 2021 -0500
+++ b/src/gf_preferences.h Mon Apr 12 18:29:56 2021 -0500
@@ -46,10 +46,8 @@
#define GF_PREF_ADVANCED_RELEASE_NOTIFICATION "/plugins/gtk/amc_grim/guifications2/advanced/release_notification"
#define GF_PREF_ADVANCED_RELEASE_LAST_CHECK "/plugins/gtk/amc_grim/guifications2/advanced/release_last_check"
-#if GTK_CHECK_VERSION(2,2,0)
# define GF_PREF_ADVANCED_SCREEN "/plugins/gtk/amc_grim/guifications2/advanced/screen"
# define GF_PREF_ADVANCED_MONITOR "/plugins/gtk/amc_grim/guifications2/advanced/monitor"
-#endif /* GTK_CHECK_VERSION(2,2,0) */
--- a/src/gf_theme_editor.c Mon Apr 12 18:23:57 2021 -0500
+++ b/src/gf_theme_editor.c Mon Apr 12 18:29:56 2021 -0500
@@ -407,34 +407,6 @@
-/* This was yanked from gtk 2.4.x, it's a wrapper to support this function on gtk 2.0 */
-gfte_tree_view_expand_to_path(GtkTreeView *tree, GtkTreePath *path) {
-#if GTK_CHECK_VERSION(2,2,0)
- gtk_tree_view_expand_to_path(tree, path);
- g_return_if_fail(GTK_IS_TREE_VIEW(tree));
- g_return_if_fail(path != NULL);
- depth = gtk_tree_path_get_depth(path);
- indices = gtk_tree_path_get_indices(path);
- tmp = gtk_tree_path_new();
- g_return_if_fail(tmp != NULL);
- for(i = 0; i < depth; i++) {
- gtk_tree_path_append_index(tmp, indices[i]);
- gtk_tree_view_expand_row(tree, tmp, FALSE);
- gtk_tree_path_free(tmp);
gfte_store_select_iter(GtkTreeIter *iter) {
@@ -443,7 +415,7 @@
model = gtk_tree_view_get_model(GTK_TREE_VIEW(editor.tree));
path = gtk_tree_model_get_path(model, iter);
- gfte_tree_view_expand_to_path(GTK_TREE_VIEW(editor.tree), path);
+ gtk_tree_view_expand_to_path(GTK_TREE_VIEW(editor.tree), path); gtk_tree_path_free(path);
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(editor.tree));
@@ -1375,11 +1347,6 @@
gchar *a_title, *b_title;
-#if !GTK_CHECK_VERSION(2,2,0)
-#endif /* !GTK_CHECK_VERSION(2,2,0) */
gtk_tree_model_get(GTK_TREE_MODEL(editor.store), a,
@@ -1399,35 +1366,7 @@
gf_items_swap(GF_ITEM(a_obj), GF_ITEM(b_obj));
-#if GTK_CHECK_VERSION(2,2,0)
gtk_tree_store_swap(editor.store, a, b);
- gtk_tree_store_set(editor.store, a,
- GFTE_STORE_OBJECT, a_obj,
- GFTE_STORE_PAGE, a_page,
- GFTE_STORE_TITLE, a_title,
- gtk_tree_store_set(editor.store, b,
- GFTE_STORE_OBJECT, b_obj,
- GFTE_STORE_PAGE, b_page,
- GFTE_STORE_TITLE, b_title,
-#endif /* GTK_CHECK_VERSION(2,2,0) */