[Rhythmbox-devel] button next to shuffle


I have written a plugin for rhythmbox which is working nicely however i have need to add a button to the main toolbar ie next to the shuffle button in the top icon bar.

I have tried shell.add_widget(button,RB.ShellUILocation.MAIN_TOP) which adds a button but its displayed after the progress bar which is not ideal.

I have also tried using add_ui_from_string with code like below, however with this method i am probably doing something wrong, ideally i would prefer the first method as its much simpler to use standard gtk function, but regardless anyone able to give me some pointers example code etc to achieve what i am after ?

ui_definition = """
    <toolbar name="ToolBar">
        <placeholder name="ToolBarPluginPlaceholder">
          <toolitem name="ToolBarWebRemote" action="">         </placeholder>

        uim = shell.props.ui_manager
        self.__ui_id = uim.add_ui_from_string(ui_definition)
        action = "">        #button=Gtk.Button('test')
        #self.object.add_widget(button,RB.ShellUILocation.MAIN_TOP,expand=False, fill=False)
        self.__action_group = Gtk.ActionGroup(name='ViewWebRemoteInfo')
        uim.insert_action_group(self.__action_group, -1)

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