Skip to content

Commit

Permalink
Silence warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jjk-jacky committed Dec 13, 2014
1 parent 962a5ce commit 68a8980
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 9 deletions.
1 change: 0 additions & 1 deletion Makefile.am
Expand Up @@ -33,7 +33,6 @@ endif
AM_CFLAGS = \
-g \
-DDOCDIR='"$(docdir)"' \
-D_BSD_SOURCE \
${WARNING_CFLAGS}

noinst_LTLIBRARIES = libshared.la
Expand Down
4 changes: 4 additions & 0 deletions src/kalu/gui.c
Expand Up @@ -1347,9 +1347,11 @@ set_status_icon (gboolean active)
* use icon as fallback */
if (icon)
#endif
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_status_icon_set_from_icon_name (icon, (kalpm_state.is_paused)
? "kalu-paused"
: "kalu");
G_GNUC_END_IGNORE_DEPRECATIONS
}
else
{
Expand Down Expand Up @@ -1377,9 +1379,11 @@ set_status_icon (gboolean active)
* use icon as fallback */
if (icon)
#endif
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_status_icon_set_from_icon_name (icon, (kalpm_state.is_paused)
? "kalu-gray-paused"
: "kalu-gray");
G_GNUC_END_IGNORE_DEPRECATIONS
}
/* do NOT get called back */
return FALSE;
Expand Down
3 changes: 2 additions & 1 deletion src/kalu/imagemenuitem.c
Expand Up @@ -941,7 +941,8 @@ donna_image_menu_item_set_label (GtkMenuItem *item,
if (!child)
{
child = gtk_label_new (NULL);
gtk_misc_set_alignment ((GtkMisc *) child, 0.0, 0.5);
gtk_widget_set_halign (child, GTK_ALIGN_START);
gtk_widget_set_valign (child, GTK_ALIGN_CENTER);
gtk_container_add ((GtkContainer *) item, child);
gtk_widget_show (child);
}
Expand Down
12 changes: 12 additions & 0 deletions src/kalu/main.c
Expand Up @@ -1116,6 +1116,7 @@ opt_debug (const gchar *option _UNUSED_,
static void
create_status_icon (void)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
debug ("create GtkStatusIcon");
icon = gtk_status_icon_new_from_icon_name ("kalu-gray");
gtk_status_icon_set_name (icon, "kalu");
Expand All @@ -1130,6 +1131,7 @@ create_status_icon (void)
G_CALLBACK (icon_press_cb), NULL);

gtk_status_icon_set_visible (icon, TRUE);
G_GNUC_END_IGNORE_DEPRECATIONS
}

#ifdef ENABLE_STATUS_NOTIFIER
Expand All @@ -1142,7 +1144,9 @@ sn_state_cb (void)
if (icon)
{
debug ("removing GtkStatusIcon");
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_status_icon_set_visible (icon, FALSE);
G_GNUC_END_IGNORE_DEPRECATIONS
g_object_unref (icon);
icon = NULL;
}
Expand Down Expand Up @@ -1433,7 +1437,9 @@ main (int argc, char *argv[])
sn_icon[SN_ICON_KALU] = g_object_ref (pixbuf_kalu);
#endif

G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_icon_theme_add_builtin_icon ("kalu", 48, pixbuf_kalu);
G_GNUC_END_IGNORE_DEPRECATIONS
}

/* kalu-paused */
Expand All @@ -1444,7 +1450,9 @@ main (int argc, char *argv[])

debug ("No icon 'kalu-paused' -- creating it");
pixbuf = get_paused_pixbuf (pixbuf_kalu);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_icon_theme_add_builtin_icon ("kalu-paused", 48, pixbuf);
G_GNUC_END_IGNORE_DEPRECATIONS
#ifdef ENABLE_STATUS_NOTIFIER
sn_icon[SN_ICON_KALU_PAUSED] = g_object_ref (pixbuf);
#endif
Expand All @@ -1459,7 +1467,9 @@ main (int argc, char *argv[])

debug ("No icon 'kalu-gray' -- creating it");
pixbuf = get_gray_pixbuf (pixbuf_kalu);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_icon_theme_add_builtin_icon ("kalu-gray", 48, pixbuf);
G_GNUC_END_IGNORE_DEPRECATIONS
#ifdef ENABLE_STATUS_NOTIFIER
sn_icon[SN_ICON_KALU_GRAY] = g_object_ref (pixbuf);
#endif
Expand All @@ -1476,7 +1486,9 @@ main (int argc, char *argv[])

debug ("No icon 'kalu-gray-paused' -- creating it");
pixbuf = get_paused_pixbuf (pixbuf_kalu);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_icon_theme_add_builtin_icon ("kalu-gray-paused", 48, pixbuf);
G_GNUC_END_IGNORE_DEPRECATIONS
#ifdef ENABLE_STATUS_NOTIFIER
sn_icon[SN_ICON_KALU_GRAY_PAUSED] = g_object_ref (pixbuf);
#endif
Expand Down
1 change: 0 additions & 1 deletion src/kalu/news.c
Expand Up @@ -1175,7 +1175,6 @@ new_window (gboolean only_updates, GtkWidget **window, GtkWidget **textview)
: _("Arch Linux News - kalu"));
gtk_window_set_default_size (GTK_WINDOW (*window), 600, 230);
gtk_container_set_border_width (GTK_CONTAINER (*window), 0);
gtk_window_set_has_resize_grip (GTK_WINDOW (*window), FALSE);
g_signal_connect (G_OBJECT (*window), "destroy",
G_CALLBACK (window_destroy_cb), NULL);
/* add to list of open windows */
Expand Down
4 changes: 2 additions & 2 deletions src/kalu/preferences.c
Expand Up @@ -1846,8 +1846,8 @@ show_prefs (void)
gtk_widget_show (spin_begin_minute);

label = gtk_label_new (_c("skip-between", "and"));
gtk_widget_set_margin_left (label, 5);
gtk_widget_set_margin_right (label, 5);
gtk_widget_set_margin_start (label, 5);
gtk_widget_set_margin_end (label, 5);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_widget_show (label);

Expand Down
11 changes: 8 additions & 3 deletions src/kalu/updater.c
Expand Up @@ -1242,7 +1242,9 @@ on_select_provider (KaluUpdater *kupdater _UNUSED_, const gchar *pkg, alpm_list_
list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
g_object_unref (store);
/* hint for alternate row colors */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (list), TRUE);
G_GNUC_END_IGNORE_DEPRECATIONS

/* scrolledwindow for list */
GtkWidget *scrolled_window;
Expand Down Expand Up @@ -1314,7 +1316,9 @@ on_select_provider (KaluUpdater *kupdater _UNUSED_, const gchar *pkg, alpm_list_
gtk_button_set_image (GTK_BUTTON (button), image);
gtk_widget_set_sensitive (button, FALSE);
gtk_widget_show (button);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
box = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
G_GNUC_END_IGNORE_DEPRECATIONS
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);

gpointer ptr1[2] = {dialog, list};
Expand Down Expand Up @@ -2811,7 +2815,6 @@ updater_run (const gchar *conffile, alpm_list_t *cmdline_post)
gtk_window_set_title (GTK_WINDOW (window), (!run_simulation)
? _("System upgrade - kalu") : _("Upgrade simulation - kalu"));
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
gtk_window_set_has_resize_grip (GTK_WINDOW (window), FALSE);
/* icon */
gtk_window_set_icon_name (GTK_WINDOW (window), "kalu");

Expand Down Expand Up @@ -2846,8 +2849,8 @@ updater_run (const gchar *conffile, alpm_list_t *cmdline_post)
/* action progress in a vbox */
GtkWidget *vbox2;
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_set_margin_left (vbox2, 10);
gtk_widget_set_margin_right (vbox2, 10);
gtk_widget_set_margin_start (vbox2, 10);
gtk_widget_set_margin_end (vbox2, 10);
gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 5);
gtk_widget_show (vbox2);

Expand Down Expand Up @@ -2904,7 +2907,9 @@ updater_run (const gchar *conffile, alpm_list_t *cmdline_post)
updater->list = list;
g_object_unref (store);
/* hint for alternate row colors */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (list), TRUE);
G_GNUC_END_IGNORE_DEPRECATIONS
/* tooltip */
gtk_widget_set_has_tooltip (list, TRUE);
g_signal_connect (G_OBJECT(list), "query-tooltip",
Expand Down
3 changes: 2 additions & 1 deletion src/kalu/watched.c
Expand Up @@ -687,7 +687,6 @@ watched_new_window (w_type_t type)
break;
}
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
gtk_window_set_has_resize_grip (GTK_WINDOW (window), FALSE);
/* add to list of open windows */
add_open_window (window);
/* icon */
Expand Down Expand Up @@ -802,7 +801,9 @@ watched_new_window (w_type_t type)
GtkWidget *list;
list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
/* hint for alternate row colors */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (list), TRUE);
G_GNUC_END_IGNORE_DEPRECATIONS
if (!is_update)
{
/* selection */
Expand Down

0 comments on commit 68a8980

Please sign in to comment.