]> granicus.if.org Git - handbrake/commitdiff
LinGui: update log and about dialog with update version strings
authorjstebbins <jstebbins.hb@gmail.com>
Mon, 2 Mar 2009 04:06:38 +0000 (04:06 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Mon, 2 Mar 2009 04:06:38 +0000 (04:06 +0000)
also, make hb home web link on about dialog spawn a browser

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2193 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/callbacks.c
gtk/src/main.c

index 68bd207c93e3ab69fc474fc38380b98ad495b1f6..7f358086d2908658a2e70211f89ef2641cedd7f2 100644 (file)
@@ -2091,14 +2091,6 @@ ghb_log(gchar *log, ...)
        va_end(args);
 }
 
-void
-about_activate_cb(GtkWidget *xwidget, signal_user_data_t *ud)
-{
-       GtkWidget *widget = GHB_WIDGET (ud->builder, "hb_about");
-       gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), ghb_version());
-       gtk_widget_show (widget);
-}
-
 static void
 browse_url(const gchar *url)
 {
@@ -2129,6 +2121,29 @@ browse_url(const gchar *url)
                                NULL, NULL, NULL);
 }
 
+void
+about_web_hook(GtkAboutDialog *about, const gchar *link, gpointer data)
+{
+       browse_url(link);
+}
+
+void
+about_activate_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+       GtkWidget *widget = GHB_WIDGET (ud->builder, "hb_about");
+       gchar *ver;
+
+       ver = g_strdup_printf("%s (%s)", HB_PROJECT_VERSION, HB_PROJECT_BUILD_ARCH);
+       gtk_about_dialog_set_url_hook(about_web_hook, NULL, NULL);
+       gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), ver);
+       g_free(ver);
+       gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(widget), 
+                                                               HB_PROJECT_URL_WEBSITE);
+       gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(widget), 
+                                                                               HB_PROJECT_URL_WEBSITE);
+       gtk_widget_show (widget);
+}
+
 void
 guide_activate_cb(GtkWidget *xwidget, signal_user_data_t *ud)
 {
index 4c7707ccfa8dffbaed1aec9e7401f913451ade0e..fa2ef4b7dfc28c0a2229c94dc08f7e8c316c3a64 100644 (file)
@@ -533,7 +533,8 @@ main (int argc, char *argv[])
        // Redirect stderr to the activity window
        ghb_preview_init(ud);
        IoRedirect(ud);
-       ghb_log("Handbrake Version: %s (%d)", hb_get_version(NULL), hb_get_build(NULL));
+    ghb_log( "%s - %s - %s",
+             HB_PROJECT_TITLE, HB_PROJECT_BUILD_TITLE, HB_PROJECT_URL_WEBSITE );
        ghb_init_dep_map();
 
        // Need to connect x264_options textview buffer to the changed signal