[gnac/devel] Removed deprecated symbols



commit 5132342c98e5d1dac191b23984c739b5b7faa165
Author: Benoît Dupasquier <bdupasqu src gnome org>
Date:   Fri Mar 1 23:30:56 2013 +0100

    Removed deprecated symbols

 src/gnac-main.c                      |   36 ++++++++++++---------------------
 src/gnac-ui.c                        |    4 +--
 src/profiles/gnac-profiles-manager.c |   28 ++++++++-----------------
 3 files changed, 23 insertions(+), 45 deletions(-)
---
diff --git a/src/gnac-main.c b/src/gnac-main.c
index 3bb8d4d..336485a 100644
--- a/src/gnac-main.c
+++ b/src/gnac-main.c
@@ -217,10 +217,8 @@ gnac_add_files_thread_entry(gpointer data)
     return;
   }
 
-  gdk_threads_enter();
-    gnac_file_list_detach_default_model();
-    gnac_ui_push_status(_("Importing files..."));
-  gdk_threads_leave();
+  gnac_file_list_detach_default_model();
+  gnac_ui_push_status(_("Importing files..."));
 
   files = (GSList *) data;
   nb_files_added = 0;
@@ -231,17 +229,15 @@ gnac_add_files_thread_entry(gpointer data)
   g_slist_free(files);
 
   if (!quit_app) {
-    gdk_threads_enter();
-      gnac_ui_set_progress_text("");
-      gnac_file_list_attach_default_model();
-      gnac_change_state(GNAC_AUDIO_READY_STATE);
-      gchar *files_added_text = g_strdup_printf(
-          ngettext("%u file imported", "%u files imported", nb_files_added),
-          nb_files_added);
-      gnac_ui_push_status(files_added_text);
-      g_free(files_added_text);
-      file_action_thread = NULL;
-    gdk_threads_leave();
+    gnac_ui_set_progress_text("");
+    gnac_file_list_attach_default_model();
+    gnac_change_state(GNAC_AUDIO_READY_STATE);
+    gchar *files_added_text = g_strdup_printf(
+        ngettext("%u file imported", "%u files imported", nb_files_added),
+        nb_files_added);
+    gnac_ui_push_status(files_added_text);
+    g_free(files_added_text);
+    file_action_thread = NULL;
   }
 }
 
@@ -382,9 +378,7 @@ gnac_on_converter_overwrite_cb(LibgnacConverter *converter,
       checkbox, FALSE, FALSE, 0);
   gtk_widget_show(checkbox);
 
-  gdk_threads_enter();
-    gint response = gtk_dialog_run(GTK_DIALOG(dialog));
-  gdk_threads_leave();
+  gint response = gtk_dialog_run(GTK_DIALOG(dialog));
 
   remember_overwrite = gtk_toggle_button_get_active(
       GTK_TOGGLE_BUTTON(checkbox));
@@ -726,8 +720,6 @@ main(gint    argc,
   /* Parse command line arguments */
   gnac_options_init(argc, argv);
 
-  gdk_threads_init();
-
   gnac_ui_init();
   gnac_init_libgnac();
 
@@ -736,9 +728,7 @@ main(gint    argc,
   /* Check if arguments have been passed through the command line */
   gnac_options_process_late();
 
-  gdk_threads_enter();
-    gtk_main();
-  gdk_threads_leave();
+  gtk_main();
 
   return EXIT_SUCCESS;
 }
diff --git a/src/gnac-ui.c b/src/gnac-ui.c
index 710dfb8..6afdcf0 100644
--- a/src/gnac-ui.c
+++ b/src/gnac-ui.c
@@ -1364,9 +1364,7 @@ gnac_ui_show_error_trash(const gchar *filename)
   gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
       _("The file \"%s\" cannot be moved to the trash."), filename);
 
-  gdk_threads_enter();
-    gint response = gtk_dialog_run(GTK_DIALOG(dialog));
-  gdk_threads_leave();
+  gint response = gtk_dialog_run(GTK_DIALOG(dialog));
 
   gtk_widget_destroy(dialog);
 
diff --git a/src/profiles/gnac-profiles-manager.c b/src/profiles/gnac-profiles-manager.c
index b26f823..4c8d425 100644
--- a/src/profiles/gnac-profiles-manager.c
+++ b/src/profiles/gnac-profiles-manager.c
@@ -867,11 +867,9 @@ gnac_profiles_mgr_display_import_status(guint profiles_ok,
         "%d files successfully imported", profiles_ok), profiles_ok);
   }
 
-  gdk_threads_enter();
-    gnac_profiles_mgr_set_window_sensitive(TRUE);
-    gnac_profiles_mgr_show_import_progressbar(FALSE);
-    gnac_profiles_mgr_display_status_message(oks, errors);
-  gdk_threads_leave();
+  gnac_profiles_mgr_set_window_sensitive(TRUE);
+  gnac_profiles_mgr_show_import_progressbar(FALSE);
+  gnac_profiles_mgr_display_status_message(oks, errors);
 
   g_free(oks);
   g_free(errors);
@@ -887,9 +885,7 @@ gnac_profiles_mgr_copy_file(GFile       *src_file,
   GFile *dest_file = g_file_new_for_path(path);
   CopyData copy_data = { path, dest_name, &error, FALSE };
 
-  gdk_threads_enter();
-    gnac_profiles_mgr_set_progress_bar_fraction(0.0);
-  gdk_threads_leave();
+  gnac_profiles_mgr_set_progress_bar_fraction(0.0);
 
   gboolean success = g_file_copy(src_file, dest_file, G_FILE_COPY_NONE, NULL,
       (GFileProgressCallback) gnac_profiles_mgr_on_drag_profile_copied,
@@ -915,10 +911,8 @@ gnac_profiles_mgr_copy_and_load_files(gpointer data)
   gint index = 0;
   gchar *uri = uris[index];
 
-  gdk_threads_enter();
-    gnac_profiles_mgr_set_window_sensitive(FALSE);
-    gnac_profiles_mgr_show_import_progressbar(TRUE);
-  gdk_threads_leave();
+  gnac_profiles_mgr_set_window_sensitive(FALSE);
+  gnac_profiles_mgr_show_import_progressbar(TRUE);
   
   guint profiles_ok = 0;
   guint profiles_error = 0;
@@ -968,9 +962,7 @@ gnac_profiles_mgr_on_drag_profile_copied(goffset  current_num_bytes,
       ((gdouble) current_num_bytes) / ((gdouble) total_num_bytes),
       0.0, 1.0);
   
-  gdk_threads_enter();
-    gnac_profiles_mgr_set_progress_bar_fraction(frac);
-  gdk_threads_leave();
+  gnac_profiles_mgr_set_progress_bar_fraction(frac);
 
   if (current_num_bytes >= total_num_bytes) {
     CopyData *copy_data = (CopyData *) user_data;
@@ -982,10 +974,8 @@ gnac_profiles_mgr_on_drag_profile_copied(goffset  current_num_bytes,
               copy_data->path, copy_data->name, copy_data->error);
 
       if (profile && !(*(copy_data->error))) {
-        gdk_threads_enter();
-          gnac_profiles_properties_save_profile(profile);
-          gnac_profiles_mgr_insert(profile);
-        gdk_threads_leave();
+        gnac_profiles_properties_save_profile(profile);
+        gnac_profiles_mgr_insert(profile);
       }
 
       GFile *file = g_file_new_for_path(copy_data->path);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]