[gnome-commander/gcmd-1-3] notebook: added set_label(GtkWidget *) method
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-commander/gcmd-1-3] notebook: added set_label(GtkWidget *) method
- Date: Sat, 1 Aug 2009 14:32:47 +0000 (UTC)
commit 66d7bec0c0173a0f0a599a22301871edff670bd5
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sat Aug 1 13:57:01 2009 +0200
notebook: added set_label(GtkWidget *) method
src/gnome-cmd-notebook.h | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/src/gnome-cmd-notebook.h b/src/gnome-cmd-notebook.h
index 94d0747..75087e1 100644
--- a/src/gnome-cmd-notebook.h
+++ b/src/gnome-cmd-notebook.h
@@ -61,8 +61,10 @@ struct GnomeCmdNotebook
void remove_page(gint n);
void remove_page() { remove_page (get_current_page()); }
- void set_label(const gchar *label=NULL);
- void set_label(gint n, const gchar *label=NULL);
+ void set_label(GtkWidget *label=NULL) { gtk_notebook_set_tab_label (*this, page(), label); }
+ void set_label(gint n, GtkWidget *label=NULL) { gtk_notebook_set_tab_label (*this, page(n), label); }
+ void set_label(const gchar *label) { set_label(label ? gtk_label_new (label) : NULL); }
+ void set_label(gint n, const gchar *label) { set_label(n, label ? gtk_label_new (label) : NULL); }
void prev_page();
void next_page();
@@ -85,17 +87,6 @@ inline void GnomeCmdNotebook::remove_page(gint n)
}
-inline void GnomeCmdNotebook::set_label(const gchar *label)
-{
- gtk_notebook_set_tab_label (*this, page(), label ? gtk_label_new (label) : NULL);
-}
-
-
-inline void GnomeCmdNotebook::set_label(gint n, const gchar *label)
-{
- gtk_notebook_set_tab_label (*this, page(n), label ? gtk_label_new (label) : NULL);
-}
-
inline void GnomeCmdNotebook::prev_page()
{
if (get_current_page()>0)
@@ -105,6 +96,7 @@ inline void GnomeCmdNotebook::prev_page()
set_current_page(-1);
}
+
inline void GnomeCmdNotebook::next_page()
{
int n = size();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]