diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..09a3e86 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +*.gmo +*.pot +Makefile +Makefile.in +stamp-* +*.tar.bz2 +*.tar.gz +.deps +.libs +*.la +*.lo +*.o +ChangeLog +INSTALL +aclocal.m4 +autom4te.cache +compile +config.guess +config.h +config.h.in +config.log +config.status +config.sub +configure +configure.ac +configure.in +depcomp +install-sh +intltool-extract.in +intltool-merge.in +intltool-update.in +libtool +ltmain.sh +missing +mkinstalldirs +Makefile.in.in +POTFILES diff --git a/configure.ac.in b/configure.ac.in index 208f286..e4e47a2 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -66,9 +66,9 @@ XDT_I18N([@LINGUAS@]) dnl *********************************** dnl *** Check for required packages *** dnl *********************************** -XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.12.0]) -XDT_CHECK_PACKAGE([EXO], [exo-1], [0.5.0]) -XDT_CHECK_PACKAGE([THUNARX], [thunarx-2], [1.0.1]) +XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.20.0]) +XDT_CHECK_PACKAGE([EXO], [exo-2], [0.11.0]) +XDT_CHECK_PACKAGE([THUNARX], [thunarx-3], [1.0.1]) XDT_CHECK_PACKAGE([TAGLIB], [taglib], [1.4]) dnl *********************************** diff --git a/thunar-plugin/Makefile.am b/thunar-plugin/Makefile.am index 4d33852..8c1c87c 100644 --- a/thunar-plugin/Makefile.am +++ b/thunar-plugin/Makefile.am @@ -8,7 +8,7 @@ INCLUDES = \ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ $(PLATFORM_CPPFLAGS) -extensionsdir = $(libdir)/thunarx-2 +extensionsdir = $(libdir)/thunarx-3 extensions_LTLIBRARIES = \ thunar-media-tags-plugin.la diff --git a/thunar-plugin/audio-tags-page.c b/thunar-plugin/audio-tags-page.c index b697e69..aa90778 100644 --- a/thunar-plugin/audio-tags-page.c +++ b/thunar-plugin/audio-tags-page.c @@ -268,7 +268,7 @@ audio_tags_page_class_init (AudioTagsPageClass *klass) static void audio_tags_page_init (AudioTagsPage *page) { - GtkObject *adjustment; + GtkWidget *adjustment; GtkWidget *vbox; GtkWidget *alignment; GtkWidget *label; @@ -433,14 +433,14 @@ audio_tags_page_init (AudioTagsPage *page) gtk_widget_show (label); /* Genre combo box */ - combo = gtk_combo_box_entry_new_text (); - exo_mutual_binding_new (G_OBJECT (GTK_BIN (combo)->child), "text", G_OBJECT (page), "genre"); + combo = gtk_combo_box_text_new_with_entry (); + exo_mutual_binding_new (G_OBJECT (gtk_bin_get_child (GTK_BIN (combo))), "text", G_OBJECT (page), "genre"); gtk_widget_set_tooltip_text (GTK_WIDGET (combo), _("Select or enter the genre of this song here.")); gtk_table_attach (GTK_TABLE (page->table), combo, 1, 4, 5, 6, GTK_FILL, 0, 0, 0); gtk_widget_show (combo); for (i=0; iaction_group = gtk_action_group_new ("audio-tags-page-actions"); @@ -458,7 +458,7 @@ audio_tags_page_init (AudioTagsPage *page) /* Determine parent window and assign it to the action */ toplevel = gtk_widget_get_toplevel (GTK_WIDGET (page)); - if (GTK_WIDGET_TOPLEVEL (toplevel)) + if (gtk_widget_is_toplevel (toplevel)) g_object_set_data_full (G_OBJECT (action), "window", g_object_ref (G_OBJECT (toplevel)), (GDestroyNotify)g_object_unref); /* Connect to the info action */ @@ -565,10 +565,9 @@ audio_tags_page_dialog_new (GtkWindow *window, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); - gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); /* Add page to the dialog */ - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), GTK_WIDGET (page)); + gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), GTK_WIDGET (page)); gtk_widget_show (GTK_WIDGET (page)); /* Create save button */ @@ -576,7 +575,8 @@ audio_tags_page_dialog_new (GtkWindow *window, /* Connect save button to the "save" action */ action = gtk_action_group_get_action (page->action_group, "save"); - gtk_action_connect_proxy (action, button); + // gtk_action_connect_proxy (action, button); + gtk_activatable_set_related_action (button, action); /* Add save button to the dialog */ gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); @@ -986,8 +986,6 @@ audio_tags_page_info_activate (GtkAction *action, GTK_RESPONSE_CLOSE, NULL); - gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); - /* Retrieve audio information */ properties = taglib_file_audioproperties (page->taglib_file); length = g_strdup_printf (_("%d:%02d Minutes"), taglib_audioproperties_length (properties) / 60, taglib_audioproperties_length (properties) % 60); @@ -1009,7 +1007,7 @@ audio_tags_page_info_activate (GtkAction *action, table = gtk_table_new (7, 2, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 12); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), table); + gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table); gtk_container_set_border_width (GTK_CONTAINER (table), 12); gtk_widget_show (table); @@ -1203,7 +1201,8 @@ audio_tags_page_set_show_save_button (AudioTagsPage *page, /* Connect to info action */ action = gtk_action_group_get_action (page->action_group, "info"); - gtk_action_connect_proxy (action, page->info_button); + // gtk_action_connect_proxy (action, page->info_button); + gtk_activatable_set_related_action (page->info_button, action); /* Save button */ page->save_button = gtk_button_new_from_stock (GTK_STOCK_SAVE); @@ -1212,7 +1211,8 @@ audio_tags_page_set_show_save_button (AudioTagsPage *page, /* Connect to save action */ action = gtk_action_group_get_action (page->action_group, "save"); - gtk_action_connect_proxy (action, page->save_button); + // gtk_action_connect_proxy (action, page->save_button); + gtk_activatable_set_related_action (page->save_button, action); } else { diff --git a/thunar-plugin/tag-renamer.c b/thunar-plugin/tag-renamer.c index 9429f67..cc99bab 100644 --- a/thunar-plugin/tag-renamer.c +++ b/thunar-plugin/tag-renamer.c @@ -107,7 +107,7 @@ static gchar *tag_renamer_process (ThunarxRenamer *renamer, ThunarxFileInfo *file, const gchar *text, guint index); -static GList *tag_renamer_get_actions (ThunarxRenamer *renamer, +static GList *tag_renamer_get_menu_items (ThunarxRenamer *renamer, GtkWindow *window, GList *files); static void tag_renamer_help_clicked (GtkWidget *button); @@ -116,7 +116,7 @@ static gboolean tag_renamer_combo_separator_func (GtkTreeModel *model, gpointer user_data); static void tag_renamer_combo_changed (GtkComboBox *combo_box, GtkWidget *entry); -static void tag_renamer_edit_tags_activated (GtkAction *action, +static void tag_renamer_edit_tags_activated (ThunarxMenuItem *item, ThunarxFileInfo *file); @@ -156,7 +156,7 @@ tag_renamer_class_init (TagRenamerClass *klass) thunarxrenamer_class = THUNARX_RENAMER_CLASS (klass); thunarxrenamer_class->process = tag_renamer_process; - thunarxrenamer_class->get_actions = tag_renamer_get_actions; + thunarxrenamer_class->get_menu_items = tag_renamer_get_menu_items; /** * TagRenamer:format: @@ -602,13 +602,13 @@ tag_renamer_process (ThunarxRenamer *renamer, static GList* -tag_renamer_get_actions (ThunarxRenamer *renamer, - GtkWindow *window, - GList *files) +tag_renamer_get_menu_items (ThunarxRenamer *renamer, + GtkWindow *window, + GList *files) { - GtkAction *action; + ThunarxMenuItem *item; GList *file; - GList *actions = NULL; + GList *items = NULL; ThunarxFileInfo *info; if (g_list_length (files) != 1) @@ -624,13 +624,13 @@ tag_renamer_get_actions (ThunarxRenamer *renamer, if (G_LIKELY (media_tags_get_audio_file_supported (info))) { /* Edit tags action */ - action = gtk_action_new ("edit-tags", _("Edit _Tags"), _("Edit ID3/OGG tags of this file."), GTK_STOCK_EDIT); - g_object_set_data_full (G_OBJECT (action), "window", g_object_ref (G_OBJECT (window)), (GDestroyNotify)g_object_unref); - g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (tag_renamer_edit_tags_activated), info); - actions = g_list_prepend (actions, action); + item = thunarx_menu_item_new ("edit-tags", _("Edit _Tags"), _("Edit ID3/OGG tags of this file."), "gtk-edit"); + g_object_set_data_full (G_OBJECT (item), "window", g_object_ref (G_OBJECT (window)), (GDestroyNotify)g_object_unref); + g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (tag_renamer_edit_tags_activated), info); + items = g_list_prepend (items, item); } - return actions; + return items; } @@ -893,14 +893,14 @@ tag_renamer_set_lowercase (TagRenamer *tag_renamer, static void -tag_renamer_edit_tags_activated (GtkAction *action, +tag_renamer_edit_tags_activated (ThunarxMenuItem *item, ThunarxFileInfo *file) { GtkWindow *window; GtkWidget *dialog; /* Determine the parent window */ - window = g_object_get_data (G_OBJECT (action), "window"); + window = g_object_get_data (G_OBJECT (item), "window"); if (G_UNLIKELY (window == NULL)) return;