[pitivi] mainwindow: Fix action names



commit f45c4875082aa207fd19650e2be0d6a3417650f1
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sun May 29 15:02:04 2016 +0200

    mainwindow: Fix action names
    
    Replaced _ with - as _ is not valid.
    
    Differential Revision: https://phabricator.freedesktop.org/D1025

 data/ui/mainmenubutton.ui   |    6 ++--
 data/ui/medialibrary.ui     |    4 +-
 data/ui/timelinetoolbar.ui  |   16 ++++++------
 pitivi/clipproperties.py    |   10 ++++----
 pitivi/mainwindow.py        |   16 ++++++------
 pitivi/medialibrary.py      |    8 +++---
 pitivi/timeline/layer.py    |   10 ++++----
 pitivi/timeline/timeline.py |   52 +++++++++++++++++++++---------------------
 8 files changed, 61 insertions(+), 61 deletions(-)
---
diff --git a/data/ui/mainmenubutton.ui b/data/ui/mainmenubutton.ui
index 8e5c13d..d2e94ef 100644
--- a/data/ui/mainmenubutton.ui
+++ b/data/ui/mainmenubutton.ui
@@ -10,7 +10,7 @@
       <object class="GtkMenuItem" id="menu_new">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="action_name">win.new_project</property>
+        <property name="action_name">win.new-project</property>
         <property name="label" translatable="yes">New project</property>
         <property name="use_underline">True</property>
       </object>
@@ -19,7 +19,7 @@
       <object class="GtkMenuItem" id="menu_open">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="action_name">win.open_project</property>
+        <property name="action_name">win.open-project</property>
         <property name="label" translatable="yes">Open project...</property>
         <property name="use_underline">True</property>
       </object>
@@ -35,7 +35,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Save the current project under a new name or a 
different location</property>
-        <property name="action_name">win.save_as</property>
+        <property name="action_name">win.save-as</property>
         <property name="label" translatable="yes">Save As...</property>
         <property name="use_underline">True</property>
       </object>
diff --git a/data/ui/medialibrary.ui b/data/ui/medialibrary.ui
index 672269c..7034d14 100644
--- a/data/ui/medialibrary.ui
+++ b/data/ui/medialibrary.ui
@@ -33,7 +33,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Remove selected clips from the project</property>
-        <property name="action_name">medialibrary.remove_assets</property>
+        <property name="action_name">medialibrary.remove-assets</property>
         <property name="label" translatable="yes">_Remove from Project</property>
         <property name="use_underline">True</property>
         <property name="icon_name">list-remove-symbolic</property>
@@ -72,7 +72,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Insert the selected clips at the end of the 
timeline</property>
-        <property name="action_name">medialibrary.insert_assets_at_end</property>
+        <property name="action_name">medialibrary.insert-assets-at-end</property>
         <property name="label" translatable="yes">Insert at _End of Timeline</property>
         <property name="use_underline">True</property>
         <property name="icon_name">insert-object-symbolic</property>
diff --git a/data/ui/timelinetoolbar.ui b/data/ui/timelinetoolbar.ui
index 3d95a2f..831af9f 100644
--- a/data/ui/timelinetoolbar.ui
+++ b/data/ui/timelinetoolbar.ui
@@ -13,7 +13,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Split clips at playhead position</property>
-        <property name="action_name">timeline.split_clips</property>
+        <property name="action_name">timeline.split-clips</property>
         <property name="label" translatable="yes">Split</property>
         <property name="use_underline">True</property>
         <property name="icon_name">pitivi-split</property>
@@ -28,7 +28,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Delete clips</property>
-        <property name="action_name">timeline.delete_selected_clips</property>
+        <property name="action_name">timeline.delete-selected-clips</property>
         <property name="label" translatable="yes">Delete</property>
         <property name="use_underline">True</property>
         <property name="stock_id">gtk-delete</property>
@@ -43,7 +43,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Group clips</property>
-        <property name="action_name">timeline.group_selected_clips</property>
+        <property name="action_name">timeline.group-selected-clips</property>
         <property name="label" translatable="yes">Group</property>
         <property name="use_underline">True</property>
         <property name="icon_name">pitivi-group</property>
@@ -58,7 +58,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Ungroup clips</property>
-        <property name="action_name">timeline.ungroup_selected_clips</property>
+        <property name="action_name">timeline.ungroup-selected-clips</property>
         <property name="label" translatable="yes">Ungroup</property>
         <property name="use_underline">True</property>
         <property name="icon_name">pitivi-ungroup</property>
@@ -73,7 +73,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Copy clips</property>
-        <property name="action_name">timeline.copy_selected_clips</property>
+        <property name="action_name">timeline.copy-selected-clips</property>
         <property name="use_underline">True</property>
         <property name="stock_id">gtk-copy</property>
       </object>
@@ -87,7 +87,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Paste clips</property>
-        <property name="action_name">timeline.paste_clips</property>
+        <property name="action_name">timeline.paste-clips</property>
         <property name="use_underline">True</property>
         <property name="stock_id">gtk-paste</property>
       </object>
@@ -103,7 +103,7 @@
         <property name="tooltip_text" translatable="yes">Align clips based on their soundtracks</property>
         <property name="visible_horizontal">False</property>
         <property name="visible_vertical">False</property>
-        <property name="action_name">timeline.align_selected_clips</property>
+        <property name="action_name">timeline.align-selected-clips</property>
         <property name="label" translatable="yes">Align</property>
         <property name="use_underline">True</property>
         <property name="icon_name">pitivi-align</property>
@@ -119,7 +119,7 @@
         <property name="can_focus">False</property>
         <property name="tooltip_text" translatable="yes">Toggle gapless mode
 When enabled, adjacent clips automatically move to fill gaps.</property>
-        <property name="action_name">timeline.toggle_gapless_mode</property>
+        <property name="action_name">timeline.toggle-gapless-mode</property>
         <property name="label" translatable="yes">Gapless mode</property>
         <property name="use_underline">True</property>
         <property name="icon_name">pitivi-gapless</property>
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index 6c88191..5d57750 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -230,15 +230,15 @@ class EffectProperties(Gtk.Expander, Loggable):
         self.hide()
 
         effects_actions_group = Gio.SimpleActionGroup()
-        self.treeview.insert_action_group("clipproperties_effects", effects_actions_group)
-        buttons_box.insert_action_group("clipproperties_effects", effects_actions_group)
+        self.treeview.insert_action_group("clipproperties-effects", effects_actions_group)
+        buttons_box.insert_action_group("clipproperties-effects", effects_actions_group)
 
-        self.remove_effect_action = Gio.SimpleAction.new("remove_effect", None)
+        self.remove_effect_action = Gio.SimpleAction.new("remove-effect", None)
         self.remove_effect_action.connect("activate", self._removeEffectCb)
         effects_actions_group.add_action(self.remove_effect_action)
-        self.app.add_accelerator("Delete", "clipproperties_effects.remove_effect", None)
+        self.app.add_accelerator("Delete", "clipproperties-effects.remove-effect", None)
         self.remove_effect_action.set_enabled(False)
-        remove_effect_button.set_action_name("clipproperties_effects.remove_effect")
+        remove_effect_button.set_action_name("clipproperties-effects.remove-effect")
 
         # Connect all the widget signals
         self.treeview_selection.connect("changed", self._treeviewSelectionChangedCb)
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index 1efac16..098029e 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -465,30 +465,30 @@ class MainWindow(Gtk.ApplicationWindow, Loggable):
         self.app.add_accelerator("<Control>s", "win.save", None)
         self.save_button.set_action_name("win.save")
 
-        self.new_project_action = Gio.SimpleAction.new("new_project", None)
+        self.new_project_action = Gio.SimpleAction.new("new-project", None)
         self.new_project_action.connect("activate", self._newProjectMenuCb)
         self.add_action(self.new_project_action)
-        self.app.add_accelerator("<Control>n", "win.new_project", None)
+        self.app.add_accelerator("<Control>n", "win.new-project", None)
 
-        self.open_project_action = Gio.SimpleAction.new("open_project", None)
+        self.open_project_action = Gio.SimpleAction.new("open-project", None)
         self.open_project_action.connect("activate", self._openProjectCb)
         self.add_action(self.open_project_action)
-        self.app.add_accelerator("<Control>o", "win.open_project", None)
+        self.app.add_accelerator("<Control>o", "win.open-project", None)
 
-        self.save_as_action = Gio.SimpleAction.new("save_as", None)
+        self.save_as_action = Gio.SimpleAction.new("save-as", None)
         self.save_as_action.connect("activate", self._saveProjectAsCb)
         self.add_action(self.save_as_action)
-        self.app.add_accelerator("<Control><Shift>s", "win.save_as", None)
+        self.app.add_accelerator("<Control><Shift>s", "win.save-as", None)
 
         self.help_action = Gio.SimpleAction.new("help", None)
         self.help_action.connect("activate", self._userManualCb)
         self.add_action(self.help_action)
         self.app.add_accelerator("F1", "win.help", None)
 
-        self.menu_button_action = Gio.SimpleAction.new("menu_button", None)
+        self.menu_button_action = Gio.SimpleAction.new("menu-button", None)
         self.menu_button_action.connect("activate", self._menuCb)
         self.add_action(self.menu_button_action)
-        self.app.add_accelerator("F10", "win.menu_button", None)
+        self.app.add_accelerator("F10", "win.menu-button", None)
 
     def showProjectStatus(self):
         project = self.app.project_manager.current_project
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 3db82f0..c969ca0 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -427,15 +427,15 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
         actions_group = Gio.SimpleActionGroup()
         self.insert_action_group("medialibrary", actions_group)
 
-        self.remove_assets_action = Gio.SimpleAction.new("remove_assets", None)
+        self.remove_assets_action = Gio.SimpleAction.new("remove-assets", None)
         self.remove_assets_action.connect("activate", self._removeAssetsCb)
         actions_group.add_action(self.remove_assets_action)
-        self.app.add_accelerator("<Control>Delete", "medialibrary.remove_assets", None)
+        self.app.add_accelerator("<Control>Delete", "medialibrary.remove-assets", None)
 
-        self.insert_at_end_action = Gio.SimpleAction.new("insert_assets_at_end", None)
+        self.insert_at_end_action = Gio.SimpleAction.new("insert-assets-at-end", None)
         self.insert_at_end_action.connect("activate", self._insertEndCb)
         actions_group.add_action(self.insert_at_end_action)
-        self.app.add_accelerator("Insert", "medialibrary.insert_assets_at_end", None)
+        self.app.add_accelerator("Insert", "medialibrary.insert-assets-at-end", None)
 
         self._updateActions()
 
diff --git a/pitivi/timeline/layer.py b/pitivi/timeline/layer.py
index 65b0703..5ca1a88 100644
--- a/pitivi/timeline/layer.py
+++ b/pitivi/timeline/layer.py
@@ -221,31 +221,31 @@ class LayerControls(Gtk.EventBox, Loggable):
         action_group = Gio.SimpleActionGroup()
         menu_model = Gio.Menu()
 
-        self.__move_layer_top_action = Gio.SimpleAction.new("move_layer_to_top", None)
+        self.__move_layer_top_action = Gio.SimpleAction.new("move-layer-to-top", None)
         action = self.__move_layer_top_action
         action.connect("activate", self._moveLayerCb, -2)
         action_group.add_action(action)
         menu_model.append(_("Move layer to top"), "layer.%s" % action.get_name().replace(" ", "."))
 
-        self.__move_layer_up_action = Gio.SimpleAction.new("move_layer_up", None)
+        self.__move_layer_up_action = Gio.SimpleAction.new("move-layer-up", None)
         action = self.__move_layer_up_action
         action.connect("activate", self._moveLayerCb, -1)
         action_group.add_action(action)
         menu_model.append(_("Move layer up"), "layer.%s" % action.get_name().replace(" ", "."))
 
-        self.__move_layer_down_action = Gio.SimpleAction.new("move_layer_down", None)
+        self.__move_layer_down_action = Gio.SimpleAction.new("move-layer-down", None)
         action = self.__move_layer_down_action
         action.connect("activate", self._moveLayerCb, 1)
         action_group.add_action(action)
         menu_model.append(_("Move layer down"), "layer.%s" % action.get_name().replace(" ", "."))
 
-        self.__move_layer_bottom_action = Gio.SimpleAction.new("move_layer_to_bottom", None)
+        self.__move_layer_bottom_action = Gio.SimpleAction.new("move-layer-to-bottom", None)
         action = self.__move_layer_bottom_action
         action.connect("activate", self._moveLayerCb, 2)
         action_group.add_action(action)
         menu_model.append(_("Move layer to bottom"), "layer.%s" % action.get_name().replace(" ", "."))
 
-        self.__delete_layer_action = Gio.SimpleAction.new("delete_layer", None)
+        self.__delete_layer_action = Gio.SimpleAction.new("delete-layer", None)
         action = self.__delete_layer_action
         action.connect("activate", self._deleteLayerCb)
         action_group.add_action(action)
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index fb7f313..7378067 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1428,56 +1428,56 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
         self.timeline.layout.insert_action_group("timeline", group)
         self.toolbar.insert_action_group("timeline", group)
 
-        self.zoom_in_action = Gio.SimpleAction.new("zoom_in", None)
+        self.zoom_in_action = Gio.SimpleAction.new("zoom-in", None)
         self.zoom_in_action.connect("activate", self._zoomInCb)
         group.add_action(self.zoom_in_action)
-        self.app.add_accelerator("<Control>plus", "timeline.zoom_in", None)
-        self.app.add_accelerator("<Control>equal", "timeline.zoom_in", None)
-        self.app.add_accelerator("<Control>KP_Add", "timeline.zoom_in", None)
+        self.app.add_accelerator("<Control>plus", "timeline.zoom-in", None)
+        self.app.add_accelerator("<Control>equal", "timeline.zoom-in", None)
+        self.app.add_accelerator("<Control>KP_Add", "timeline.zoom-in", None)
 
-        self.zoom_out_action = Gio.SimpleAction.new("zoom_out", None)
+        self.zoom_out_action = Gio.SimpleAction.new("zoom-out", None)
         self.zoom_out_action.connect("activate", self._zoomOutCb)
         group.add_action(self.zoom_out_action)
-        self.app.add_accelerator("<Control>minus", "timeline.zoom_out", None)
-        self.app.add_accelerator("<Control>KP_Subtract", "timeline.zoom_out", None)
+        self.app.add_accelerator("<Control>minus", "timeline.zoom-out", None)
+        self.app.add_accelerator("<Control>KP_Subtract", "timeline.zoom-out", None)
 
-        self.zoom_fit_action = Gio.SimpleAction.new("zoom_fit", None)
+        self.zoom_fit_action = Gio.SimpleAction.new("zoom-fit", None)
         self.zoom_fit_action.connect("activate", self._zoomFitCb)
         group.add_action(self.zoom_fit_action)
-        self.app.add_accelerator("<Control>0", "timeline.zoom_fit", None)
+        self.app.add_accelerator("<Control>0", "timeline.zoom-fit", None)
 
         # Clips actions.
-        self.delete_action = Gio.SimpleAction.new("delete_selected_clips", None)
+        self.delete_action = Gio.SimpleAction.new("delete-selected-clips", None)
         self.delete_action.connect("activate", self._deleteSelected)
         group.add_action(self.delete_action)
-        self.app.add_accelerator("Delete", "timeline.delete_selected_clips", None)
+        self.app.add_accelerator("Delete", "timeline.delete-selected-clips", None)
 
-        self.group_action = Gio.SimpleAction.new("group_selected_clips", None)
+        self.group_action = Gio.SimpleAction.new("group-selected-clips", None)
         self.group_action.connect("activate", self._groupSelected)
         group.add_action(self.group_action)
-        self.app.add_accelerator("<Control>g", "timeline.group_selected_clips", None)
+        self.app.add_accelerator("<Control>g", "timeline.group-selected-clips", None)
 
-        self.ungroup_action = Gio.SimpleAction.new("ungroup_selected_clips", None)
+        self.ungroup_action = Gio.SimpleAction.new("ungroup-selected-clips", None)
         self.ungroup_action.connect("activate", self._ungroupSelected)
         group.add_action(self.ungroup_action)
-        self.app.add_accelerator("<Shift><Control>g", "timeline.ungroup_selected_clips", None)
+        self.app.add_accelerator("<Shift><Control>g", "timeline.ungroup-selected-clips", None)
 
-        self.copy_action = Gio.SimpleAction.new("copy_selected_clips", None)
+        self.copy_action = Gio.SimpleAction.new("copy-selected-clips", None)
         self.copy_action.connect("activate", self.__copyClipsCb)
         group.add_action(self.copy_action)
-        self.app.add_accelerator("<Control>c", "timeline.copy_selected_clips", None)
+        self.app.add_accelerator("<Control>c", "timeline.copy-selected-clips", None)
 
-        self.paste_action = Gio.SimpleAction.new("paste_clips", None)
+        self.paste_action = Gio.SimpleAction.new("paste-clips", None)
         self.paste_action.connect("activate", self.__pasteClipsCb)
         group.add_action(self.paste_action)
-        self.app.add_accelerator("<Control>v", "timeline.paste_clips", None)
+        self.app.add_accelerator("<Control>v", "timeline.paste-clips", None)
 
-        self.align_action = Gio.SimpleAction.new("align_selected_clips", None)
+        self.align_action = Gio.SimpleAction.new("align-selected-clips", None)
         self.align_action.connect("activate", self._alignSelectedCb)
         group.add_action(self.align_action)
-        self.app.add_accelerator("<Shift><Control>a", "timeline.align_selected_clips", None)
+        self.app.add_accelerator("<Shift><Control>a", "timeline.align-selected-clips", None)
 
-        self.gapless_action = Gio.SimpleAction.new("toggle_gapless_mode", None)
+        self.gapless_action = Gio.SimpleAction.new("toggle-gapless-mode", None)
         self.gapless_action.connect("activate", self._gaplessmodeToggledCb)
         group.add_action(self.gapless_action)
 
@@ -1487,16 +1487,16 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
         group.add_action(self.play_action)
         self.app.add_accelerator("space", "timeline.play", None)
 
-        self.split_action = Gio.SimpleAction.new("split_clips", None)
+        self.split_action = Gio.SimpleAction.new("split-clips", None)
         self.split_action.connect("activate", self._splitCb)
         group.add_action(self.split_action)
-        self.app.add_accelerator("S", "timeline.split_clips", None)
+        self.app.add_accelerator("S", "timeline.split-clips", None)
         self.split_action.set_enabled(True)
 
-        self.keyframe_action = Gio.SimpleAction.new("keyframe_selected_clips", None)
+        self.keyframe_action = Gio.SimpleAction.new("keyframe-selected-clips", None)
         self.keyframe_action.connect("activate", self._keyframe_cb)
         group.add_action(self.keyframe_action)
-        self.app.add_accelerator("K", "timeline.keyframe_selected_clips", None)
+        self.app.add_accelerator("K", "timeline.keyframe-selected-clips", None)
 
     def _setBestZoomRatio(self, allow_zoom_in=False):
         """


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