forked from osmocom/wireshark
Simplified some GTK_CHECK_VERSION to improve readability.
svn path=/trunk/; revision=38708
This commit is contained in:
parent
21ba557e5c
commit
09017cb3ea
|
@ -418,8 +418,7 @@ info_bar_new(void)
|
|||
file_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(info_bar), "file");
|
||||
help_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(info_bar), "help");
|
||||
filter_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(info_bar), "filter");
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
#else
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(info_bar), FALSE);
|
||||
#endif
|
||||
gtk_statusbar_push(GTK_STATUSBAR(info_bar), main_ctx, DEF_READY_MESSAGE);
|
||||
|
@ -437,8 +436,7 @@ packets_bar_new(void)
|
|||
packets_bar = gtk_statusbar_new();
|
||||
packets_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(packets_bar), "packets");
|
||||
packets_bar_update();
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
#else
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(packets_bar), FALSE);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -186,8 +186,7 @@ packet_list_class_init(PacketListClass *klass)
|
|||
|
||||
object_class->finalize = packet_list_finalize;
|
||||
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
#else
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
/* XXX this seems to affect TreeView Application wide
|
||||
* Move to main.c ??? as it's not a bad thing(tm)
|
||||
*/
|
||||
|
|
|
@ -1976,8 +1976,7 @@ decode_streams(void)
|
|||
statusbar_context = gtk_statusbar_get_context_id((GtkStatusbar *) info_bar, "main");
|
||||
gtk_statusbar_push((GtkStatusbar *) info_bar, statusbar_context, " Decoding RTP packets...");
|
||||
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
#else
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(info_bar), FALSE);
|
||||
#endif
|
||||
/* reset the number of packet to be decoded, this is used for the progress bar */
|
||||
|
@ -2024,8 +2023,7 @@ decode_streams(void)
|
|||
gtk_widget_show_all(main_scrolled_window);
|
||||
|
||||
gtk_widget_destroy(progress_bar);
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
#else
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(info_bar), TRUE);
|
||||
#endif
|
||||
gtk_statusbar_pop((GtkStatusbar *) info_bar, statusbar_context);
|
||||
|
@ -2239,8 +2237,7 @@ rtp_player_dlg_create(void)
|
|||
|
||||
/* statusbar */
|
||||
info_bar = gtk_statusbar_new();
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
#else
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(info_bar), TRUE);
|
||||
#endif
|
||||
gtk_box_pack_start(GTK_BOX(stat_hbox), info_bar, TRUE, TRUE, 0);
|
||||
|
|
|
@ -309,8 +309,7 @@ struct graph {
|
|||
* temporary
|
||||
*/
|
||||
PangoFontDescription *font; /* font used for annotations etc. */
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
#else
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
GdkGC *fg_gc;
|
||||
#endif
|
||||
#if GTK_CHECK_VERSION(2,22,0)
|
||||
|
@ -366,8 +365,7 @@ struct graph {
|
|||
} gt;
|
||||
};
|
||||
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
#else
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
static GdkGC *xor_gc = NULL;
|
||||
#endif
|
||||
static int refnum=0;
|
||||
|
@ -806,8 +804,7 @@ static void create_drawing_area (struct graph *g)
|
|||
#else
|
||||
g->font = gtk_widget_get_style(g->drawing_area)->font_desc;
|
||||
#endif
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
#else
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
colormap = gtk_widget_get_colormap(GTK_WIDGET(g->drawing_area));
|
||||
if (!xor_gc) {
|
||||
xor_gc = gdk_gc_new (gtk_widget_get_window(g->drawing_area));
|
||||
|
|
Loading…
Reference in New Issue