diff options
author | Burt P <pburt0@gmail.com> | 2017-07-31 00:35:37 -0500 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2017-08-04 09:22:06 -0700 |
commit | 6bcf1dfaae11933c27588912974337b9b51b240d (patch) | |
tree | 9dbbcd050ce9821620da1c08c958902d6ab0eff1 /shell/shell.c | |
parent | 19abe537d0d7f68c488e0562b98de9b80c53a9ba (diff) |
Change some GTK_CHECK_VERSION()s to earliest version supported
Shows some code that could be simplified if GTK+2 requirement was
increased.
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'shell/shell.c')
-rwxr-xr-x | shell/shell.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/shell/shell.c b/shell/shell.c index 6485447e..f5358911 100755 --- a/shell/shell.c +++ b/shell/shell.c @@ -843,7 +843,7 @@ static gboolean update_field(gpointer data) static gboolean reload_section(gpointer data) { ShellModuleEntry *entry = (ShellModuleEntry *) data; -#if GTK_CHECK_VERSION(3, 0, 0) +#if GTK_CHECK_VERSION(2, 14, 0) GdkWindow *gdk_window = gtk_widget_get_window(GTK_WIDGET(shell->window)); #endif @@ -864,7 +864,7 @@ static gboolean reload_section(gpointer data) #endif /* avoid drawing the window while we reload */ -#if GTK_CHECK_VERSION(3, 0, 0) +#if GTK_CHECK_VERSION(2, 14, 0) gdk_window_freeze_updates(gdk_window); #else gdk_window_freeze_updates(shell->window->window); @@ -898,7 +898,7 @@ static gboolean reload_section(gpointer data) } /* make the window drawable again */ -#if GTK_CHECK_VERSION(3, 0, 0) +#if GTK_CHECK_VERSION(2, 14, 0) gdk_window_thaw_updates(gdk_window); #else gdk_window_thaw_updates(shell->window->window); @@ -954,7 +954,7 @@ info_tree_compare_val_func(GtkTreeModel * model, static void set_view_type(ShellViewType viewtype, gboolean reload) { -#if GTK_CHECK_VERSION(3, 0, 0) +#if GTK_CHECK_VERSION(2, 18, 0) GtkAllocation* alloc; #endif @@ -1006,7 +1006,7 @@ static void set_view_type(ShellViewType viewtype, gboolean reload) gtk_notebook_set_current_page(GTK_NOTEBOOK(shell->notebook), 0); gtk_widget_show(shell->notebook); -#if GTK_CHECK_VERSION(3, 0, 0) +#if GTK_CHECK_VERSION(2, 18, 0) alloc = g_new(GtkAllocation, 1); gtk_widget_get_allocation(shell->hpaned, alloc); gtk_paned_set_position(GTK_PANED(shell->vpaned), alloc->height / 2); @@ -1022,7 +1022,7 @@ static void set_view_type(ShellViewType viewtype, gboolean reload) gtk_widget_show(shell->notebook); load_graph_clear(shell->loadgraph); -#if GTK_CHECK_VERSION(3, 0, 0) +#if GTK_CHECK_VERSION(2, 18, 0) alloc = g_new(GtkAllocation, 1); gtk_widget_get_allocation(shell->hpaned, alloc); gtk_paned_set_position(GTK_PANED(shell->vpaned), @@ -1407,7 +1407,7 @@ module_selected_show_info(ShellModuleEntry * entry, gboolean reload) gboolean has_shell_param = FALSE; gint i; gsize ngroups; -#if GTK_CHECK_VERSION(3, 0, 0) +#if GTK_CHECK_VERSION(2, 14, 0) GdkWindow *gdk_window = gtk_widget_get_window(GTK_WIDGET(shell->info->view)); #endif @@ -1415,7 +1415,7 @@ module_selected_show_info(ShellModuleEntry * entry, gboolean reload) key_data = module_entry_function(entry); /* */ -#if GTK_CHECK_VERSION(3, 0, 0) +#if GTK_CHECK_VERSION(2, 14, 0) gdk_window_freeze_updates(gdk_window); #else gdk_window_freeze_updates(shell->info->view->window); @@ -1470,7 +1470,7 @@ module_selected_show_info(ShellModuleEntry * entry, gboolean reload) gtk_tree_view_set_model(GTK_TREE_VIEW(shell->info->view), shell->info->model); gtk_tree_view_expand_all(GTK_TREE_VIEW(shell->info->view)); -#if GTK_CHECK_VERSION(3, 0, 0) +#if GTK_CHECK_VERSION(2, 14, 0) gdk_window_thaw_updates(gdk_window); #else gdk_window_thaw_updates(shell->info->view->window); |