Fix compiler warnings.
authorHong Jen Yee (PCMan) <pcman.tw@gmail.com>
Sat, 7 Aug 2010 17:59:56 +0000 (01:59 +0800)
committerHong Jen Yee (PCMan) <pcman.tw@gmail.com>
Sat, 7 Aug 2010 17:59:56 +0000 (01:59 +0800)
Update translations.

po/lxappearance.pot
po/zh_TW.po
src/color-scheme.c
src/cursor-theme.c
src/icon-theme.c
src/lxappearance.c
src/plugin.c
src/utils.c
src/widget-theme.c

index 0664fbb..10bd1d5 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-08-08 00:42+0800\n"
+"POT-Creation-Date: 2010-08-08 01:59+0800\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -125,118 +125,122 @@ msgid "Play event sounds"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:23
-msgid "Preview of the selected icon theme"
+msgid "Preview of the selected cursor theme"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:24
-msgid "Preview of the selected widget style"
+msgid "Preview of the selected icon theme"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:25
-msgid "Radio Button"
+msgid "Preview of the selected widget style"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:26
-msgid "Remove"
+msgid "Radio Button"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:27
-msgid "Same as buttons"
+msgid "Remove"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:28
-msgid "Same as dialogs"
+msgid "Same as buttons"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:29
-msgid "Same as drag icons"
+msgid "Same as dialogs"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:30
-msgid "Same as menu items"
+msgid "Same as drag icons"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:31
-msgid "Selected items:"
+msgid "Same as menu items"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:32
-msgid "Show images in menus"
+msgid "Selected items:"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:33
-msgid "Show images on buttons"
+msgid "Show images in menus"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:34
-msgid "Size of cursors"
+msgid "Show images on buttons"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:35
-msgid "Small toolbar icon"
+msgid "Size of cursors"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:36
-msgid "Smaller"
+msgid "Small toolbar icon"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:37
-msgid "Text below icons"
+msgid "Smaller"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:38
-msgid "Text beside icons"
+msgid "Text below icons"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:39
-msgid "Text only"
+msgid "Text beside icons"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:40
-msgid "Text windows:"
+msgid "Text only"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:41
-msgid "Toolbar Icon Size: "
+msgid "Text windows:"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:42
-msgid "Toolbar Style: "
+msgid "Toolbar Icon Size: "
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:43
-msgid "Tooltips:"
+msgid "Toolbar Style: "
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:44
-msgid "Use customized color scheme"
+msgid "Tooltips:"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:45
-msgid "Widget"
+msgid "Use customized color scheme"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:46
-msgid "Window Border"
+msgid "Widget"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:47
-msgid "_Edit"
+msgid "Window Border"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:48
-msgid "_File"
+msgid "_Edit"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:49
-msgid "_Help"
+msgid "_File"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:50
-msgid "button"
+msgid "_Help"
 msgstr ""
 
 #: ../data/ui/lxappearance.glade.h:51
+msgid "button"
+msgstr ""
+
+#: ../data/ui/lxappearance.glade.h:52
 msgid "play event sounds as feedback to user input"
 msgstr ""
 
index 08c5b21..3e05395 100644 (file)
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 0.1\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-08-08 00:42+0800\n"
-"PO-Revision-Date: 2010-08-08 00:45+0800\n"
+"POT-Creation-Date: 2010-08-08 01:59+0800\n"
+"PO-Revision-Date: 2010-08-08 01:59+0800\n"
 "Last-Translator: 洪任諭 <pcman.tw@gmail.com>\n"
 "Language-Team: zh_TW <zh@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -110,7 +110,7 @@ msgstr "正常視窗:"
 
 #: ../data/ui/lxappearance.glade.h:19
 msgid "Other"
-msgstr "其他"
+msgstr "其他"
 
 #: ../data/ui/lxappearance.glade.h:20
 msgid "Page1"
@@ -125,118 +125,122 @@ msgid "Play event sounds"
 msgstr "播放事件音效"
 
 #: ../data/ui/lxappearance.glade.h:23
+msgid "Preview of the selected cursor theme"
+msgstr "預覽選取的滑鼠游標佈景主題"
+
+#: ../data/ui/lxappearance.glade.h:24
 msgid "Preview of the selected icon theme"
 msgstr "預覽選取的圖示佈景主題"
 
-#: ../data/ui/lxappearance.glade.h:24
+#: ../data/ui/lxappearance.glade.h:25
 msgid "Preview of the selected widget style"
 msgstr "預覽選取的視窗元件佈景主題"
 
-#: ../data/ui/lxappearance.glade.h:25
+#: ../data/ui/lxappearance.glade.h:26
 msgid "Radio Button"
 msgstr "Radio 按鈕"
 
-#: ../data/ui/lxappearance.glade.h:26
+#: ../data/ui/lxappearance.glade.h:27
 msgid "Remove"
 msgstr "移除"
 
-#: ../data/ui/lxappearance.glade.h:27
+#: ../data/ui/lxappearance.glade.h:28
 msgid "Same as buttons"
 msgstr "和按鈕相同"
 
-#: ../data/ui/lxappearance.glade.h:28
+#: ../data/ui/lxappearance.glade.h:29
 msgid "Same as dialogs"
 msgstr "和對話框相同"
 
-#: ../data/ui/lxappearance.glade.h:29
+#: ../data/ui/lxappearance.glade.h:30
 msgid "Same as drag icons"
 msgstr "和滑鼠拖放時相同"
 
-#: ../data/ui/lxappearance.glade.h:30
+#: ../data/ui/lxappearance.glade.h:31
 msgid "Same as menu items"
 msgstr "和選單項目相同"
 
-#: ../data/ui/lxappearance.glade.h:31
+#: ../data/ui/lxappearance.glade.h:32
 msgid "Selected items:"
 msgstr "選取的項目:"
 
-#: ../data/ui/lxappearance.glade.h:32
+#: ../data/ui/lxappearance.glade.h:33
 msgid "Show images in menus"
 msgstr "在選單中顯示圖示"
 
-#: ../data/ui/lxappearance.glade.h:33
+#: ../data/ui/lxappearance.glade.h:34
 msgid "Show images on buttons"
 msgstr "在按鈕上顯示圖示"
 
-#: ../data/ui/lxappearance.glade.h:34
+#: ../data/ui/lxappearance.glade.h:35
 msgid "Size of cursors"
 msgstr "游標大小"
 
-#: ../data/ui/lxappearance.glade.h:35
+#: ../data/ui/lxappearance.glade.h:36
 msgid "Small toolbar icon"
 msgstr "小型工具列圖示"
 
-#: ../data/ui/lxappearance.glade.h:36
+#: ../data/ui/lxappearance.glade.h:37
 msgid "Smaller"
 msgstr "較小"
 
-#: ../data/ui/lxappearance.glade.h:37
+#: ../data/ui/lxappearance.glade.h:38
 msgid "Text below icons"
 msgstr "文字在圖示下方"
 
-#: ../data/ui/lxappearance.glade.h:38
+#: ../data/ui/lxappearance.glade.h:39
 msgid "Text beside icons"
 msgstr "文字在圖示旁"
 
-#: ../data/ui/lxappearance.glade.h:39
+#: ../data/ui/lxappearance.glade.h:40
 msgid "Text only"
 msgstr "只有文字"
 
-#: ../data/ui/lxappearance.glade.h:40
+#: ../data/ui/lxappearance.glade.h:41
 msgid "Text windows:"
 msgstr "文字視窗:"
 
-#: ../data/ui/lxappearance.glade.h:41
+#: ../data/ui/lxappearance.glade.h:42
 msgid "Toolbar Icon Size: "
 msgstr "工具列圖示大小:"
 
-#: ../data/ui/lxappearance.glade.h:42
+#: ../data/ui/lxappearance.glade.h:43
 msgid "Toolbar Style: "
 msgstr "工具列風格:"
 
-#: ../data/ui/lxappearance.glade.h:43
+#: ../data/ui/lxappearance.glade.h:44
 msgid "Tooltips:"
 msgstr "工具提示:"
 
-#: ../data/ui/lxappearance.glade.h:44
+#: ../data/ui/lxappearance.glade.h:45
 msgid "Use customized color scheme"
 msgstr "使用自訂的色彩"
 
-#: ../data/ui/lxappearance.glade.h:45
+#: ../data/ui/lxappearance.glade.h:46
 msgid "Widget"
 msgstr "圖形元件"
 
-#: ../data/ui/lxappearance.glade.h:46
+#: ../data/ui/lxappearance.glade.h:47
 msgid "Window Border"
 msgstr "視窗邊框"
 
-#: ../data/ui/lxappearance.glade.h:47
+#: ../data/ui/lxappearance.glade.h:48
 msgid "_Edit"
 msgstr "編輯(_E)"
 
-#: ../data/ui/lxappearance.glade.h:48
+#: ../data/ui/lxappearance.glade.h:49
 msgid "_File"
 msgstr "檔案(_F)"
 
-#: ../data/ui/lxappearance.glade.h:49
+#: ../data/ui/lxappearance.glade.h:50
 msgid "_Help"
 msgstr "說明(_H)"
 
-#: ../data/ui/lxappearance.glade.h:50
+#: ../data/ui/lxappearance.glade.h:51
 msgid "button"
 msgstr "按鈕"
 
-#: ../data/ui/lxappearance.glade.h:51
+#: ../data/ui/lxappearance.glade.h:52
 msgid "play event sounds as feedback to user input"
 msgstr "使用者輸入時播放回饋音效"
 
index 77526a1..4b78193 100644 (file)
@@ -107,9 +107,9 @@ static void update_color_buttons()
             if(gdk_color_parse(color_str, &clr))
             {
                 /* prevent invoking color-set handlers here. */
-                g_signal_handlers_block_by_func(btn, on_color_set, color_name);
+                g_signal_handlers_block_by_func(btn, on_color_set, (gpointer)color_name);
                 gtk_color_button_set_color(GTK_COLOR_BUTTON(btn), &clr);
-                g_signal_handlers_unblock_by_func(btn, on_color_set, color_name);
+                g_signal_handlers_unblock_by_func(btn, on_color_set, (gpointer)color_name);
             }
             gtk_widget_set_sensitive(btn, TRUE);
         }
@@ -188,7 +188,7 @@ void color_scheme_init(GtkBuilder* b)
     color_scheme_update();
 
     for(i = 0; i < 8; ++i)
-        g_signal_connect(app.color_btns[i], "color-set", G_CALLBACK(on_color_set), gnome_color_names[i]);
+        g_signal_connect(app.color_btns[i], "color-set", G_CALLBACK(on_color_set), (gpointer)gnome_color_names[i]);
 }
 
 /* return FALSE when the gtkrc file does not exists. */
index 00031f0..4e77d68 100644 (file)
@@ -47,7 +47,7 @@ static void update_cursor_demo()
         gtk_list_store_insert_with_values(store, &it, -1, 0, pix, -1);
         g_object_unref(pix);
     }
-    gtk_icon_view_set_model(app.cursor_demo_view, GTK_TREE_MODEL(store));
+    gtk_icon_view_set_model(GTK_ICON_VIEW(app.cursor_demo_view), GTK_TREE_MODEL(store));
     g_object_unref(store);
 
     /* gtk+ programs should reload named cursors correctly.
@@ -103,7 +103,7 @@ static void on_cursor_theme_size_changed(GtkRange* range, gpointer user_data)
 void cursor_theme_init(GtkBuilder* b)
 {
     int max_cursor_w, max_cursor_h, max_size;
-    GtkTreeSelection* sel = gtk_tree_view_get_selection(app.cursor_theme_view);
+    GtkTreeSelection* sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(app.cursor_theme_view));
     /* treeview and model are already set up in icon_theme_init() */
     g_signal_connect(sel, "changed", G_CALLBACK(on_cursor_theme_sel_changed), NULL);
 
@@ -111,15 +111,15 @@ void cursor_theme_init(GtkBuilder* b)
     max_size = MAX(max_cursor_w, max_cursor_h);
 
     /* FIXME: this isn't fully working... */
-    app.cursor_size_range = GTK_RANGE(gtk_builder_get_object(b, "cursor_size"));
+    app.cursor_size_range = GTK_WIDGET(gtk_builder_get_object(b, "cursor_size"));
     if(max_size < 128)
-        gtk_range_set_range(app.cursor_size_range, 1, max_size + 10); /* 10 is page size */
-    gtk_range_set_value(app.cursor_size_range, app.cursor_theme_size);
+        gtk_range_set_range(GTK_RANGE(app.cursor_size_range), 1, max_size + 10); /* 10 is page size */
+    gtk_range_set_value(GTK_RANGE(app.cursor_size_range), app.cursor_theme_size);
     g_signal_connect(app.cursor_size_range, "value-changed", G_CALLBACK(on_cursor_theme_size_changed), NULL);
 
     /* set up demo for cursors */
     app.cursor_demo_view = GTK_WIDGET(gtk_builder_get_object(b, "cursor_demo_view"));
-    gtk_icon_view_set_pixbuf_column(app.cursor_demo_view, 0);
+    gtk_icon_view_set_pixbuf_column(GTK_ICON_VIEW(app.cursor_demo_view), 0);
     update_cursor_demo();
 
     /* install and remove */
index 16ff205..396c00b 100644 (file)
@@ -152,7 +152,7 @@ static void on_icon_theme_sel_changed(GtkTreeSelection* tree_sel, gpointer user_
 
 static void on_install_theme_clicked(GtkButton* btn, gpointer user_data)
 {
-    install_icon_theme(gtk_widget_get_toplevel(btn));
+    install_icon_theme(GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(btn))));
 }
 
 static void on_remove_theme_clicked(GtkButton* btn, gpointer user_data)
@@ -162,10 +162,10 @@ static void on_remove_theme_clicked(GtkButton* btn, gpointer user_data)
     GtkTreeModel* model;
     GtkTreeIter it;
 
-    if(btn == app.icon_theme_remove_btn) /* remove icon theme */
-        sel = gtk_tree_view_get_selection(app.icon_theme_view);
-    else if(btn == app.cursor_theme_remove_btn) /* remove cursor theme */
-        sel = gtk_tree_view_get_selection(app.cursor_theme_view);
+    if(btn == (GtkButton*)app.icon_theme_remove_btn) /* remove icon theme */
+        sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(app.icon_theme_view));
+    else if(btn == (GtkButton*)app.cursor_theme_remove_btn) /* remove cursor theme */
+        sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(app.cursor_theme_view));
     else
         return;
 
@@ -182,7 +182,7 @@ static void on_remove_theme_clicked(GtkButton* btn, gpointer user_data)
         }
 
         gtk_tree_model_get(model, &it, 1, &theme, -1);
-        if(remove_icon_theme(gtk_widget_get_toplevel(btn), theme))
+        if(remove_icon_theme(GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(btn))), theme))
         {
             gtk_list_store_remove(GTK_LIST_STORE(model), &it);
 
@@ -193,7 +193,7 @@ static void on_remove_theme_clicked(GtkButton* btn, gpointer user_data)
             /* FIXME: in rare case, a theme can contain both icons and cursors */
             if(both) /* we need to remove item in another list store, too */
             {
-                model = (model == app.icon_theme_store ? app.cursor_theme_store : app.icon_theme_store);
+                model = GTK_TREE_MODEL(model == (GtkTreeModel*)app.icon_theme_store ? app.cursor_theme_store : app.icon_theme_store);
                 /* find the item in another store */
                 if(gtk_tree_model_get_iter_first(model, &it))
                 {
@@ -273,32 +273,32 @@ void icon_theme_init(GtkBuilder* b)
     }
 
     /* select the currently used theme from the list */
-    gtk_tree_view_set_model(app.icon_theme_view, GTK_TREE_MODEL(app.icon_theme_store));
-    sel = gtk_tree_view_get_selection(app.icon_theme_view);
+    gtk_tree_view_set_model(GTK_TREE_VIEW(app.icon_theme_view), GTK_TREE_MODEL(app.icon_theme_store));
+    sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(app.icon_theme_view));
     if(icon_theme_sel_it.user_data)
     {
         IconTheme* theme;
         GtkTreePath* tp = gtk_tree_model_get_path(GTK_TREE_MODEL(app.icon_theme_store), &icon_theme_sel_it);
         gtk_tree_selection_select_iter(sel, &icon_theme_sel_it);
-        gtk_tree_view_scroll_to_cell(app.icon_theme_view, tp, NULL, FALSE, 0, 0);
+        gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(app.icon_theme_view), tp, NULL, FALSE, 0, 0);
         gtk_tree_path_free(tp);
 
-        gtk_tree_model_get(app.icon_theme_store, &icon_theme_sel_it, 1, &theme, -1);
+        gtk_tree_model_get(GTK_TREE_MODEL(app.icon_theme_store), &icon_theme_sel_it, 1, &theme, -1);
         gtk_widget_set_sensitive(app.icon_theme_remove_btn, theme->is_removable);
     }
     g_signal_connect(sel, "changed", G_CALLBACK(on_icon_theme_sel_changed), NULL);
 
-    gtk_tree_view_set_model(app.cursor_theme_view, GTK_TREE_MODEL(app.cursor_theme_store));
-    sel = gtk_tree_view_get_selection(app.cursor_theme_view);
+    gtk_tree_view_set_model(GTK_TREE_VIEW(app.cursor_theme_view), GTK_TREE_MODEL(app.cursor_theme_store));
+    sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(app.cursor_theme_view));
     if(cursor_theme_sel_it.user_data)
     {
         IconTheme* theme;
         GtkTreePath* tp = gtk_tree_model_get_path(GTK_TREE_MODEL(app.cursor_theme_store), &cursor_theme_sel_it);
         gtk_tree_selection_select_iter(sel, &cursor_theme_sel_it);
-        gtk_tree_view_scroll_to_cell(app.cursor_theme_view, tp, NULL, FALSE, 0, 0);
+        gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(app.cursor_theme_view), tp, NULL, FALSE, 0, 0);
         gtk_tree_path_free(tp);
 
-        gtk_tree_model_get(app.cursor_theme_store, &cursor_theme_sel_it, 1, &theme, -1);
+        gtk_tree_model_get(GTK_TREE_MODEL(app.cursor_theme_store), &cursor_theme_sel_it, 1, &theme, -1);
         gtk_widget_set_sensitive(app.cursor_theme_remove_btn, theme->is_removable);
     }
 }
index a6c6025..a98855e 100644 (file)
@@ -211,7 +211,8 @@ static void lxappearance_save_lxsession()
         g_mkdir_with_parents(user_config_file, 0700);
         user_config_file[len] = '/';
 
-        g_key_file_load_from_dirs(kf, rel_path, g_get_system_config_dirs(), NULL, G_KEY_FILE_KEEP_COMMENTS|G_KEY_FILE_KEEP_TRANSLATIONS, NULL);
+        g_key_file_load_from_dirs(kf, rel_path, (const char**)g_get_system_config_dirs(), NULL,
+                                  G_KEY_FILE_KEEP_COMMENTS|G_KEY_FILE_KEEP_TRANSLATIONS, NULL);
     }
 
     g_free(rel_path);
@@ -264,7 +265,7 @@ static void on_dlg_response(GtkDialog* dlg, int res, gpointer user_data)
         reload_all_programs();
 
         app.changed = FALSE;
-        gtk_dialog_set_response_sensitive(app.dlg, GTK_RESPONSE_APPLY, FALSE);
+        gtk_dialog_set_response_sensitive(GTK_DIALOG(app.dlg), GTK_RESPONSE_APPLY, FALSE);
         break;
     case 1: /* about dialog */
         {
@@ -272,7 +273,7 @@ static void on_dlg_response(GtkDialog* dlg, int res, gpointer user_data)
             if(gtk_builder_add_from_file(b, PACKAGE_UI_DIR "/about.ui", NULL))
             {
                 GtkWidget* dlg = GTK_WIDGET(gtk_builder_get_object(b, "dlg"));
-                gtk_dialog_run(dlg);
+                gtk_dialog_run(GTK_DIALOG(dlg));
                 gtk_widget_destroy(dlg);
             }
             g_object_unref(b);
@@ -331,7 +332,7 @@ static void settings_init()
         GKeyFile* kf = g_key_file_new();
         if(g_key_file_load_from_file(kf, user_config_file, 0, NULL))
             app.color_scheme = g_key_file_get_string(kf, "GTK", "sGtk/ColorScheme", NULL);
-        else if(g_key_file_load_from_dirs(kf, rel_path, g_get_system_config_dirs(), NULL, 0, NULL))
+        else if(g_key_file_load_from_dirs(kf, rel_path, (const char**)g_get_system_config_dirs(), NULL, 0, NULL))
             app.color_scheme = g_key_file_get_string(kf, "GTK", "sGtk/ColorScheme", NULL);
         g_key_file_free(kf);
         g_free(rel_path);
@@ -426,6 +427,6 @@ void lxappearance_changed()
     if(!app.changed)
     {
         app.changed = TRUE;
-        gtk_dialog_set_response_sensitive(app.dlg, GTK_RESPONSE_APPLY, TRUE);
+        gtk_dialog_set_response_sensitive(GTK_DIALOG(app.dlg), GTK_RESPONSE_APPLY, TRUE);
     }
 }
index 9042b1f..bd22c18 100644 (file)
@@ -43,7 +43,7 @@ static GSList* plugins = NULL;
 void plugins_init(GtkBuilder* builder)
 {
     GDir* dir = g_dir_open(PLUGIN_DIR, 0, NULL);
-    char* name;
+    const char* name;
     if(!dir)
         return;
     while(name = g_dir_read_name(dir))
@@ -58,14 +58,14 @@ void plugins_init(GtkBuilder* builder)
                 PluginLoadFunc load;
                 gboolean loaded = FALSE;
                 g_debug("module: %s", g_module_name(mod));
-                if(g_module_symbol(mod, "plugin_load", &load))
+                if(g_module_symbol(mod, "plugin_load", (gpointer*)&load))
                     loaded = load(&app, builder);
                 if(loaded)
                 {
                     Plugin* plugin = g_slice_new0(Plugin);
                     plugin->module = mod;
                     plugin->load = load;
-                    g_module_symbol(mod, "plugin_unload", &plugin->unload);
+                    g_module_symbol(mod, "plugin_unload", (gpointer*)&plugin->unload);
                     plugins = g_slist_prepend(plugins, plugin);
                 }
                 else
index 24746c2..f3dddfc 100644 (file)
@@ -61,22 +61,22 @@ gboolean show_progress_for_pid(GtkWindow* parent, const char* title, const char*
                             GTK_DIALOG_NO_SEPARATOR|GTK_DIALOG_MODAL,
                             GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
     GtkWidget* progress = gtk_progress_bar_new();
-    GtkWidget* vbox = gtk_dialog_get_content_area(dlg);
+    GtkWidget* vbox = gtk_dialog_get_content_area(GTK_DIALOG(dlg));
     GtkWidget* label = gtk_label_new(msg);
 
     guint child_watch = g_child_watch_add(pid, on_pid_exit, dlg);
-    guint timeout = g_timeout_add(300, on_progress_timeout, progress);
+    guint timeout = g_timeout_add(300, (GSourceFunc)on_progress_timeout, progress);
 
     gtk_window_set_default_size(GTK_WINDOW(dlg), 240, -1);
-    gtk_box_set_spacing(vbox, 6);
+    gtk_box_set_spacing(GTK_BOX(vbox), 6);
     gtk_widget_show(label);
-    gtk_box_pack_start(vbox, label, FALSE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, TRUE, 0);
     gtk_widget_show(progress);
-    gtk_box_pack_start(vbox, progress, FALSE, TRUE, 0);
-    gtk_progress_set_activity_mode(progress, TRUE);
+    gtk_box_pack_start(GTK_BOX(vbox), progress, FALSE, TRUE, 0);
+    gtk_progress_set_activity_mode(GTK_PROGRESS(progress), TRUE);
     g_signal_connect(dlg, "response", G_CALLBACK(on_progress_dlg_response), &pid);
 
-    res = gtk_dialog_run(dlg);
+    res = gtk_dialog_run(GTK_DIALOG(dlg));
 
     g_source_remove(child_watch);
     g_source_remove(timeout);
@@ -120,7 +120,7 @@ static gboolean install_icon_theme_package(const char* package_path)
         "-C",
         tmp_dir,
         "-xf",
-        package_path,
+        (char*)package_path,
         NULL
     };
 
@@ -145,7 +145,7 @@ static gboolean install_icon_theme_package(const char* package_path)
     {
         g_debug("pid = %d", pid);
         /* show progress UI for this pid */
-        if(show_progress_for_pid(app.dlg, "Install themes", "Installing...", pid))
+        if(show_progress_for_pid(GTK_WINDOW(app.dlg), "Install themes", "Installing...", pid))
         {
             /* move files in tmp_dir to user_icons_dir */
             GDir* dir;
@@ -160,7 +160,7 @@ static gboolean install_icon_theme_package(const char* package_path)
             if(dir)
             {
                 char* name;
-                while(name = g_dir_read_name(dir))
+                while(name = (char*)g_dir_read_name(dir))
                 {
                     char* index_theme = g_build_filename(tmp_dir, name, "index.theme", NULL);
                     gboolean is_theme = g_file_test(index_theme, G_FILE_TEST_EXISTS);
@@ -213,7 +213,7 @@ gboolean install_icon_theme(GtkWindow* parent)
                                         GTK_FILE_CHOOSER_ACTION_OPEN,
                                         GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                                         GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL );
-    gtk_window_set_transient_for(fc, app.dlg);
+    gtk_window_set_transient_for(GTK_WINDOW(fc), GTK_WINDOW(app.dlg));
     gtk_file_filter_add_pattern( filter, "*.tar.gz" );
     gtk_file_filter_add_pattern( filter, "*.tar.bz2" );
     gtk_file_filter_set_name( filter, _("*.tar.gz, *.tar.bz2 (Icon Theme)") );
@@ -254,7 +254,7 @@ g_debug("tmp_dir = %s", tmp_dir);
             GPid pid;
             if(g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH|G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, NULL))
             {
-                ret = show_progress_for_pid(app.dlg, "Remove icon theme", "Removing...", pid);
+                ret = show_progress_for_pid(GTK_WINDOW(app.dlg), "Remove icon theme", "Removing...", pid);
             }
         }
         g_free(tmp_dest);
index 423fae2..f891e99 100644 (file)
@@ -95,13 +95,13 @@ static void load_themes()
         g_free(name);
     }
 
-    gtk_tree_view_set_model(app.widget_theme_view, GTK_TREE_MODEL(app.widget_theme_store));
-    tree_sel = gtk_tree_view_get_selection(app.widget_theme_view);
+    gtk_tree_view_set_model(GTK_TREE_VIEW(app.widget_theme_view), GTK_TREE_MODEL(app.widget_theme_store));
+    tree_sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(app.widget_theme_view));
     if(sel_it.user_data)
     {
         GtkTreePath* tp = gtk_tree_model_get_path(GTK_TREE_MODEL(app.widget_theme_store), &sel_it);
         gtk_tree_selection_select_iter(tree_sel, &sel_it);
-        gtk_tree_view_scroll_to_cell(app.widget_theme_view, tp, NULL, FALSE, 0, 0);
+        gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(app.widget_theme_view), tp, NULL, FALSE, 0, 0);
         gtk_tree_path_free(tp);
     }