Skip to content

Commit 6fe5ce7

Browse files
committed
fix tab rename
1 parent fbd1624 commit 6fe5ce7

File tree

4 files changed

+3
-15
lines changed

4 files changed

+3
-15
lines changed

TODO

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
- tab menu / rename -> segv
21

32
- hide tabs if only one tab in window, though we'd need to allow tab drop
43
anywhere in window for that

src/view.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ view_child_front( View *child )
282282
{
283283
View *parent = child->parent;
284284

285-
VIEW_GET_CLASS( parent )->child_front( parent, child );
285+
if( parent )
286+
VIEW_GET_CLASS( parent )->child_front( parent, child );
286287
}
287288

288289
/* Break link to model.

src/workspace.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,22 +1752,9 @@ workspace_selected_save( Workspace *ws, const char *filename )
17521752
gboolean
17531753
workspace_rename( Workspace *ws, const char *name, const char *caption )
17541754
{
1755-
Workspacegroup *wsg = workspace_get_workspacegroup( ws );
1756-
17571755
if( !symbol_rename( ws->sym, name ) )
17581756
return( FALSE );
1759-
1760-
g_object_ref( ws );
1761-
1762-
icontainer_child_remove( ICONTAINER( ws ) );
17631757
iobject_set( IOBJECT( ws ), IOBJECT( ws->sym )->name, caption );
1764-
icontainer_child_add( ICONTAINER( wsg ), ICONTAINER( ws ),
1765-
ICONTAINER( ws )->pos );
1766-
1767-
g_object_unref( ws );
1768-
1769-
// do we need this? unclear
1770-
//iobject_changed( IOBJECT( wsg ) );
17711758

17721759
return( TRUE );
17731760
}

src/workspacegroupview.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ workspacegroupview_rename_sub( iWindow *iwnd, void *client,
311311
nfn( sys, IWINDOW_ERROR );
312312
return;
313313
}
314+
314315
model_front( MODEL( ws ) );
315316

316317
nfn( sys, IWINDOW_YES );

0 commit comments

Comments
 (0)