diff options
author | Alex Merry <alex.merry@cs.ox.ac.uk> | 2012-12-17 19:09:06 +0000 |
---|---|---|
committer | Alex Merry <alex.merry@cs.ox.ac.uk> | 2012-12-17 19:09:06 +0000 |
commit | 58ceedc38ed430535508360adde7b5b6d76b08e6 (patch) | |
tree | e43e8fc2e63f00ff7945bb1bd6d1c3e41b3f5e1d /tikzit/src/gtk/PropertiesPane.m | |
parent | 5ac1d383d2a89d22fbf54d688d64bf6a1036df6b (diff) |
Allow node and edge styles to be applied to selection
Brings back some old functionality, but in a more compact way.
Diffstat (limited to 'tikzit/src/gtk/PropertiesPane.m')
-rw-r--r-- | tikzit/src/gtk/PropertiesPane.m | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/tikzit/src/gtk/PropertiesPane.m b/tikzit/src/gtk/PropertiesPane.m index 684668e..990304e 100644 --- a/tikzit/src/gtk/PropertiesPane.m +++ b/tikzit/src/gtk/PropertiesPane.m @@ -17,12 +17,8 @@ #import "PropertiesPane.h" -#import "Configuration.h" -#import "EdgeStylesModel.h" #import "GraphElementProperty.h" -#import "NodeStylesModel.h" #import "PropertyListEditor.h" -#import "StyleManager.h" #import "TikzDocument.h" #import "gtkhelpers.h" @@ -84,18 +80,18 @@ static void edge_node_toggled_cb (GtkToggleButton *widget, PropertiesPane *pane) @implementation PropertiesPane -- (id) init { - [self release]; - return nil; -} - +// we don't currently use the styles models - (id) initWithStyleManager:(StyleManager*)sm { - return [self initWithNodeStylesModel:[NodeStylesModel modelWithStyleManager:sm] - andEdgeStylesModel:[EdgeStylesModel modelWithStyleManager:sm]]; + return [self init]; } +// we don't currently use the styles models - (id) initWithNodeStylesModel:(NodeStylesModel*)nsm andEdgeStylesModel:(EdgeStylesModel*)esm { + return [self init]; +} + +- (id) init { self = [super init]; if (self) { @@ -580,11 +576,7 @@ static GtkWidget *createPropsPaneWithLabelEntry (PropertyListEditor *props, GtkE static GtkWidget *createBoldLabel (const gchar *text) { GtkWidget *label = gtk_label_new (text); - PangoAttrList *attrs = pango_attr_list_new (); - pango_attr_list_insert (attrs, - pango_attr_weight_new (PANGO_WEIGHT_SEMIBOLD)); - gtk_label_set_attributes (GTK_LABEL (label), attrs); - pango_attr_list_unref (attrs); + label_set_bold (GTK_LABEL (label)); return label; } |