Update plugin title, i.e. dockwidget or window title
542893
def update_plugin_title(self):
        """"""
        if self.dockwidget is not None:
            win = self.dockwidget
        elif self.undocked_window is not None:
            win = self.undocked_window
        else:
            return
        win.setWindowTitle(self.get_plugin_title())
931548
def set_window_title(self):
        """"""
        if DEV is not None:
            title = u"Spyder %s (Python %s.%s)" % (__version__,
                                                   sys.version_info[0],
                                                   sys.version_info[1])
        else:
            title = u"Spyder (Python %s.%s)" % (sys.version_info[0],
                                                sys.version_info[1])

        if get_debug_level():
            title += u" [DEBUG MODE %d]" % get_debug_level()

        if self.window_title is not None:
            title += u' -- ' + to_text_string(self.window_title)

        if self.projects is not None:
            path = self.projects.get_active_project_path()
            if path:
                path = path.replace(get_home_dir(), u'~')
                title = u'{0} - {1}'.format(path, title)

        self.base_title = title
        self.setWindowTitle(self.base_title)
505858
def switch_to_plugin(self):
        """"""
        # Unmaxizime currently maximized plugin
        if (self.main.last_plugin is not None and
                self.main.last_plugin.ismaximized and
                self.main.last_plugin is not self):
            self.main.maximize_dockwidget()

        # Show plugin only if it was already visible
        if self.get_option('visible_if_project_open'):
            if not self.toggle_view_action.isChecked():
                self.toggle_view_action.setChecked(True)
            self.visibility_changed(True)
554399
def refresh_plugin(self):
        """"""
        if self.tabwidget.count():
            editor = self.tabwidget.currentWidget()
        else:
            editor = None
        self.find_widget.set_editor(editor)
338751
def refresh_file_dependent_actions(self):
        """"""
        if self.dockwidget and self.dockwidget.isVisible():
            enable = self.get_current_editor() is not None
            for action in self.file_dependent_actions:
                action.setEnabled(enable)
226772
function(widget_title) {

		if (Lava.schema.DEBUG && !(widget_title in this.widgets)) Lava.t("Widget config not found: " + widget_title);

		var config = this.widgets[widget_title];

		if (!config.is_extended) {

			Lava.extenders[config.extender_type](config);

		}

		return config;

	}
626411
def add_dockwidget(self, child):
        """"""
        dockwidget, location = child.create_dockwidget()
        if CONF.get('main', 'vertical_dockwidget_titlebars'):
            dockwidget.setFeatures(dockwidget.features()|
                                   QDockWidget.DockWidgetVerticalTitleBar)
        self.addDockWidget(location, dockwidget)
        self.widgetlist.append(child)
1350353
private static void customize(FeatureAttributeWindow window, Feature feature) {
		DockableWindow.mixin(window);
		if (isSelectOnZoom()) {
			ToolStrip ts = window.getToolStrip();
			Canvas editBtn = null;
			// hackety hack
			for (Canvas c : ts.getMembers()) {
				if (c instanceof IButton && WidgetLayout.iconEdit.equals(((IButton) c).getIcon())) {
					editBtn = c;
				}
			}
			ts.removeMembers(ts.getMembers()); // clear
			ts.addMember(new SelectingZoomButton(feature));
			if (editBtn != null) {
				ts.addSpacer(2);
				ts.addMember(editBtn);
			}
		}
	}
877748
def create_dockwidget(self):
        """"""
        # Creating dock widget
        dock = SpyderDockWidget(self.get_plugin_title(), self.main)

        # Set properties
        dock.setObjectName(self.__class__.__name__+"_dw")
        dock.setAllowedAreas(self.ALLOWED_AREAS)
        dock.setFeatures(self.FEATURES)
        dock.setWidget(self)
        self.update_margins()
        dock.visibilityChanged.connect(self.visibility_changed)
        dock.topLevelChanged.connect(self.on_top_level_changed)
        dock.sig_plugin_closed.connect(self.plugin_closed)
        self.dockwidget = dock
        if self.shortcut is not None:
            sc = QShortcut(QKeySequence(self.shortcut), self.main,
                            self.switch_to_plugin)
            self.register_shortcut(sc, "_", "Switch to %s" % self.CONF_SECTION)
        return (dock, self.LOCATION)
1160706
def set_title(self, title):
        
        assert isinstance(title, six.text_type)
        self._winapi(windll.kernel32.SetConsoleTitleW, title)
887942
def register_plugin(self):
        """"""
        self.focus_changed.connect(self.main.plugin_focus_changed)
        self.main.add_dockwidget(self)
        # Connecting the following signal once the dockwidget has been created:
        self.shell.exception_occurred.connect(self.exception_occurred)
834726
def update_style(self, title=None,defaults=None,mappings=None, verbose=False):
        
        u=self.__url
        host=u.split("//")[1].split(":")[0]
        port=u.split(":")[2].split("/")[0]
        version=u.split(":")[2].split("/")[1]

        if defaults:
            defaults_=[]
            for d in defaults:
                if d:
                    defaults_.append(d)
            defaults=defaults_

        if mappings:
            mappings_=[]
            for m in mappings:
                if m:
                    mappings_.append(m)
            mappings=mappings_

        URL="http://"+str(host)+":"+str(port)+"/v1/styles/"+str(title)
        if verbose:
            print(URL)
            sys.stdout.flush()

        response = requests.get(URL).json()

        olddefaults=response["defaults"]
        oldmappings=response["mappings"]

        if mappings:
            mappings_visual_properties=[ m["visualProperty"] for m in mappings ]
            newmappings=[ m for m in oldmappings if m["visualProperty"] not in mappings_visual_properties ]
            for m in mappings:
                newmappings.append(m)
        else:
            newmappings=oldmappings

        if defaults:
            defaults_visual_properties=[ m["visualProperty"] for m in defaults ]
            newdefaults=[ m for m in olddefaults if m["visualProperty"] not in defaults_visual_properties ]
            for m in defaults:
                newdefaults.append(m)
        else:
            newdefaults=olddefaults

        r=requests.delete(URL)
        checkresponse(r)

        URL="http://"+str(host)+":"+str(port)+"/v1/styles"
        PARAMS={"title":title,\
            "defaults":newdefaults,\
            "mappings":newmappings}
        r = requests.post(url = URL, json = PARAMS)
        checkresponse(r)
1060811
def apply_panes_settings(self):
        """"""
        for plugin in (self.widgetlist + self.thirdparty_plugins):
            features = plugin.FEATURES
            if CONF.get('main', 'vertical_dockwidget_titlebars'):
                features = features | QDockWidget.DockWidgetVerticalTitleBar
            plugin.dockwidget.setFeatures(features)
            plugin.update_margins()
953328
public void updateTitle() {

        m_publishDialog.setCaption(
            Messages.get().key(
                Messages.GUI_PUBLISH_DIALOG_PROBLEMS_2,
                m_publishDialog.getSelectedWorkflow().getNiceName(),
                String.valueOf(m_list.getWidgetCount())));
    }
803845
def refresh_actions(self):
        
        self.options_menu.clear()

        # Decide what additional actions to show
        if self.undocked_window is None:
            additional_actions = [MENU_SEPARATOR,
                                  self.undock_action,
                                  self.close_plugin_action]
        else:
            additional_actions = [MENU_SEPARATOR,
                                  self.dock_action]

        # Create actions list
        self.plugin_actions = self.get_plugin_actions() + additional_actions
        add_actions(self.options_menu, self.plugin_actions)
1290098
def build_gui(self, container):
        """"""

        vbox, sw, orientation = Widgets.get_oriented_box(container)

        captions = (('Channel:', 'label', 'Channel Name', 'combobox',
                     'Modified only', 'checkbutton'), )
        w, b = Widgets.build_info(captions, orientation=orientation)
        self.w.update(b)

        b.channel_name.set_tooltip('Channel for locating images to save')
        b.channel_name.add_callback('activated', self.select_channel_cb)

        mod_only = self.settings.get('modified_only', True)
        b.modified_only.set_state(mod_only)
        b.modified_only.add_callback('activated', lambda *args: self.redo())
        b.modified_only.set_tooltip("Show only locally modified images")

        container.add_widget(w, stretch=0)

        captions = (('Path:', 'llabel', 'OutDir', 'entry', 'Browse', 'button'),
                    ('Suffix:', 'llabel', 'Suffix', 'entry'))
        w, b = Widgets.build_info(captions, orientation=orientation)
        self.w.update(b)

        b.outdir.set_text(self.outdir)
        b.outdir.set_tooltip('Output directory')
        b.outdir.add_callback('activated', lambda w: self.set_outdir())

        b.browse.set_tooltip('Browse for output directory')
        b.browse.add_callback('activated', lambda w: self.browse_outdir())

        b.suffix.set_text(self.suffix)
        b.suffix.set_tooltip('Suffix to append to filename')
        b.suffix.add_callback('activated', lambda w: self.set_suffix())

        container.add_widget(w, stretch=0)

        self.treeview = Widgets.TreeView(auto_expand=True,
                                         sortable=True,
                                         selection='multiple',
                                         use_alt_row_color=True)
        self.treeview.setup_table(self.columns, 1, 'IMAGE')
        self.treeview.add_callback('selected', self.toggle_save_cb)
        container.add_widget(self.treeview, stretch=1)

        captions = (('Status', 'llabel'), )
        w, b = Widgets.build_info(captions, orientation=orientation)
        self.w.update(b)
        b.status.set_text('')
        b.status.set_tooltip('Status message')
        container.add_widget(w, stretch=0)

        btns = Widgets.HBox()
        btns.set_border_width(4)
        btns.set_spacing(3)

        btn = Widgets.Button('Save')
        btn.set_tooltip('Save selected image(s)')
        btn.add_callback('activated', lambda w: self.save_images())
        btn.set_enabled(False)
        btns.add_widget(btn, stretch=0)
        self.w.save = btn

        btn = Widgets.Button('Close')
        btn.add_callback('activated', lambda w: self.close())
        btns.add_widget(btn, stretch=0)
        btn = Widgets.Button("Help")
        btn.add_callback('activated', lambda w: self.help())
        btns.add_widget(btn, stretch=0)
        btns.add_widget(Widgets.Label(''), stretch=1)
        container.add_widget(btns, stretch=0)

        self.gui_up = True

        # Initialize directory selection dialog
        self.dirsel = DirectorySelection(self.fv.w.root.get_widget())

        # Generate initial listing
        self.update_channels()
725087
def _title_uptodate(self,fullfile,pid,_title):
        """"""
        i=self.fb.get_object(pid)
        if i.has_key('name'):
            if _title == i['name']:
                return True

        return False