summaryrefslogtreecommitdiff
path: root/src/share-extension.c
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-10-29 06:38:41 +0200
committerJasmine Hassan <[email protected]>2012-10-29 15:21:56 +0200
commit7b59638eafc0950ac4778d144558311abfc4dcf6 (patch)
tree6440608629a71acede3d22e883d21e32b8f34e59 /src/share-extension.c
parentdc95eb7d3665927604cfd582dbc2027655fd6c7d (diff)
downloadmate-user-share-7b59638eafc0950ac4778d144558311abfc4dcf6.tar.bz2
mate-user-share-7b59638eafc0950ac4778d144558311abfc4dcf6.tar.xz
[share-bar] make it a (improved) GtkInfoBar
1. Instead of a GtkBox. This fixes the different appearance of the bar from the rest of the stock Nautilus bars. http://git.gnome.org/browse/gnome-user-share/commit/?id=1cfba2417317e5059635568cb49e5093e989e4fa => Note: Don't use GTK3 functions: gtk_box_new(), gtk_widget_set_halign() Stick with gtk_vbox_new() and gtk_misc_set_alignment(), for now. 2. share-bar: remove unused nautilus_share_bar_get_button() http://git.gnome.org/browse/gnome-user-share/commit/?id=71f364b6646a470e829f87bb1f076ca360fc24c5 3. share-bar: make the label property write only http://git.gnome.org/browse/gnome-user-share/commit/?id=c307a0196399f0ff29be4a7a4fad0a6c43a22e1b 4. share-bar: don't set italic text http://git.gnome.org/browse/gnome-user-share/commit/?id=05df1dd95aef7b164932d89d91004df264bbdbe4 5. Improve the nautilus cluebar (text more concise and bar more compact) http://git.gnome.org/browse/gnome-user-share/commit/?id=8ae76ce81119e63ac6fdfdd537d256bf82069e0a 6. share-bar: remove empty finalize method http://git.gnome.org/browse/gnome-user-share/commit/?id=d1c1de37ba47b723a43c0adff9f78a2fa56e45ae
Diffstat (limited to 'src/share-extension.c')
-rw-r--r--src/share-extension.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/share-extension.c b/src/share-extension.c
index 83fb36f..01a574a 100644
--- a/src/share-extension.c
+++ b/src/share-extension.c
@@ -104,10 +104,13 @@ launch_prefs_on_window (GtkWindow *window)
}
static void
-bar_activated_cb (CajaShareBar *bar,
- gpointer data)
+bar_response_cb (CajaShareBar *bar,
+ gint response,
+ gpointer data)
{
- launch_prefs_on_window (GTK_WINDOW (data));
+ if (response == CAJA_SHARE_BAR_RESPONSE_PREFERENCES) {
+ launch_prefs_on_window (GTK_WINDOW (data));
+ }
}
static void
@@ -170,17 +173,17 @@ caja_user_share_get_location_widget (CajaLocationWidgetProvider *iface,
share = CAJA_USER_SHARE (iface);
if (is_dir[0] != FALSE && is_dir[1] != FALSE) {
- bar = caja_share_bar_new (_("You can share files from this folder and receive files to it"));
+ bar = caja_share_bar_new (_("May be used to share or receive files"));
} else if (is_dir[0] != FALSE) {
- bar = caja_share_bar_new (_("You can share files from this folder over the network and Bluetooth"));
+ bar = caja_share_bar_new (_("May be shared over the network or Bluetooth"));
} else {
- bar = caja_share_bar_new (_("You can receive files over Bluetooth into this folder"));
+ bar = caja_share_bar_new (_("May be used to receive files over Bluetooth"));
}
add_widget (share, caja_share_bar_get_button (CAJA_SHARE_BAR (bar)));
- g_signal_connect (bar, "activate",
- G_CALLBACK (bar_activated_cb),
+ g_signal_connect (bar, "response",
+ G_CALLBACK (bar_response_cb),
window);
gtk_widget_show (bar);